Class DateUtil
Provide utitilies about handling DateTime values
Assembly: Reportman.Drawing.dll
Syntax
Constructors
View Source
DateUtil()
Declaration
Fields
View Source
FIRST_DELPHI_DAY
Declaration
public static DateTime FIRST_DELPHI_DAY
Field Value
Methods
View Source
AddWorkableDays(DateTime, int)
Declaration
public static DateTime AddWorkableDays(DateTime value, int days)
Parameters
Returns
View Source
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
View Source
DateTimeToDelphiDateTime(DateTime)
Converts a DateTime to a double value representing the number of days from 30 Dec 1899
It mantains the time
Declaration
public static double DateTimeToDelphiDateTime(DateTime avalue)
Parameters
Returns
View Source
DateTimeToFbLiteralHour(DateTime)
Declaration
public static string DateTimeToFbLiteralHour(DateTime nvalue)
Parameters
Returns
View Source
DateTimeToUnixTimestamp(DateTime)
Declaration
public static double DateTimeToUnixTimestamp(DateTime dateTime)
Parameters
Returns
View Source
DateToISO8601(DateTime, bool)
Declaration
public static string DateToISO8601(DateTime value, bool useZone)
Parameters
Returns
View Source
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)
|
View Source
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
View Source
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
View Source
IsDateTime(string, out DateTime)
Declaration
public static bool IsDateTime(string val, out DateTime result)
Parameters
Returns
View Source
LastDayOfMonth(DateTime)
Declaration
public static DateTime LastDayOfMonth(DateTime value)
Parameters
Returns
View Source
NextDayOfMonth(DateTime, int)
Declaration
public static DateTime NextDayOfMonth(DateTime value, int nday)
Parameters
Returns
View Source
NextFriDay(DateTime)
Declaration
public static DateTime NextFriDay(DateTime value)
Parameters
Returns
View Source
NextSaturday(DateTime)
Declaration
public static DateTime NextSaturday(DateTime value)
Parameters
Returns