public static object TIMEVALUE(object arg) { DateTime dt; if (!TryCastAsDateTime(arg, out dt)) { return(new ArgumentException("TIMEVALUE")); } double v = OPs.ToExcelDate(dt); return(v - Math.Truncate(v)); }
public static object DATEVALUE(object arg) { if (arg == null) { return(null); } DateTime dt; if (!TryCastAsDateTime(arg, out dt)) { return(new ArgumentException("DATEVALUE")); } return(OPs.ToExcelDate(dt.Date)); }
public static object TIMEVALUE(IList args) { double v = OPs.ToExcelDate(DateTime.Now); return(v - Math.Truncate(v)); }
public static object DATEVALUE(IList args) { return(OPs.ToExcelDate(DateTime.Now)); }
public static object NOW(IList args) { return(OPs.ToExcelDate(DateTime.Now)); }
public static object TODAY(IList args) { return(OPs.ToExcelDate(DateTime.Now.Date)); }