Class DateUtil
Provide utitilies about handling DateTime values
Assembly: Reportman.Drawing.dll
Syntax
Constructors
DateUtil()
Declaration
Fields
FIRST_DELPHI_DAY
Declaration
public static DateTime FIRST_DELPHI_DAY
Field Value
Methods
AddWorkableDays(DateTime, int)
Declaration
public static DateTime AddWorkableDays(DateTime value, int days)
Parameters
Returns
DateTimeToDelphiDate(DateTime)
Converts a DateTime to a double value representing the number of days from 30 Dec 1899
Declaration
public static double DateTimeToDelphiDate(DateTime avalue)
Parameters
Returns
DateTimeToFbLiteralHour(DateTime)
Declaration
public static string DateTimeToFbLiteralHour(DateTime nvalue)
Parameters
Returns
DateTimeToUnixTimestamp(DateTime)
Declaration
public static double DateTimeToUnixTimestamp(DateTime dateTime)
Parameters
Returns
DateToISO8601(DateTime, bool)
Declaration
public static string DateToISO8601(DateTime value, bool useZone)
Parameters
Returns
DateToSqlLiteral(DateTime)
Calculates the sql literal date value, to include it in sql sentences
Declaration
public static string DateToSqlLiteral(DateTime value)
Parameters
Returns
| Type |
Description |
| string |
The sql representation, with quotes of the date (not including time information)
|
DelphiDateTimeToTimeSpan(double)
Converts a Delphi DateTime to a TimeSpan, time since 30 DEC 1899
Declaration
public static TimeSpan DelphiDateTimeToTimeSpan(double avalue)
Parameters
| Type |
Name |
Description |
| double |
avalue |
|
Returns
DelphiDateToDateTime(double)
Converts a double representing the number of days from 30 Dec 1899 to DateTime
Declaration
public static DateTime DelphiDateToDateTime(double avalue)
Parameters
| Type |
Name |
Description |
| double |
avalue |
|
Returns
IsDateTime(string, out DateTime)
Declaration
public static bool IsDateTime(string val, out DateTime result)
Parameters
Returns
LastDayOfMonth(DateTime)
Declaration
public static DateTime LastDayOfMonth(DateTime value)
Parameters
Returns
NextDayOfMonth(DateTime, int)
Declaration
public static DateTime NextDayOfMonth(DateTime value, int nday)
Parameters
Returns
NextFriDay(DateTime)
Declaration
public static DateTime NextFriDay(DateTime value)
Parameters
Returns
NextSaturday(DateTime)
Declaration
public static DateTime NextSaturday(DateTime value)
Parameters
Returns