> Building your report / Expressions / Functions / Date and time functions

Date and time functions (DateTime)

Below is a list of DateTime functions, which can be used in expressions.

Function Description
DateTimeToFormattedString (date, format) Converts the value of a DateTime instance to its equivalent string representation.
DateTimeToString (date) Converts the value of a DateTime instance to its equivalent string representation.
Days(d) Returns a TimeSpan that represents the specified number of days, where the specification is accurate to the nearest millisecond.
DaysInMonth (year, month) Returns the number of days in the specified month and year.
Hours(d) Returns a TimeSpan that represents the specified number of hours, where the specification is accurate to the nearest millisecond.
IsLeapYear (year) Indicates whether the specified year is a leap year.
Milliseconds(d) Returns a TimeSpan that represents a specified number of milliseconds.
Minutes(d) Returns a TimeSpan that represents the specified number of minutes, where the specification is accurate to the nearest millisecond.
Now Gets a DateTime that is set to the current date and time on this computer, expressed as the local time.
ParseDateTime(s) Converts the specified string representation of a date and time to its DateTime equivalent.
Seconds(d) Returns a TimeSpan that represents the specified number of seconds, where the specification is accurate to the nearest millisecond.
Ticks(l)

Returns a TimeSpan that represents a specified time, measured in the unit of ticks.

Note: Ticks are 100-nanosecond units of time. A particular date can be expressed as the number of ticks since 12:00 midnight, January 1, 0001 A.D. (C.E.) in the Gregorian Calendar.

UtcNow Gets a DateTime that is set to the current data and time on this computer, expressed as the Coordinated Universal Time (UTC).

Go to top