Date and Date/Time Functions

Use date and date/time functions in formulas for calculating or translating information into a different format for display in forms and reports. In standard reporting, these functions are helpful in displaying values in columns in a format other than the default. 

FunctionDescription
AddDays(numdays, datetime)This function returns a date or time equal to the specified date with the specified number of days added.
AddDaysInSession(numdaysdatetimelocation)This function returns a date or time equal to the specified date or time plus the specified number of in-session days, using the specified location's track (calendar configuration). If the location parameter is EMPTY, the system-wide track is used. Essentially, this function skips past any days not in session (like weekends, holidays, etc.) to arrive at the final date.
AddDaysInSessionForTrack(numdaysdatetimetrack

This function returns a date or time equal to the specified date or time plus the specified number of in-session days, using the specified track (calendar configuration). If the track parameter is EMPTY, the system-wide track is used. Essentially, this function skips past any days not in session (like weekends, holidays, etc.) to arrive at the final date.

For example, adding one to a Friday date would result in Monday (assuming Monday is in session).

AddHours(numhours, datetimeThis function returns a date or time equal to the specified date or time plus the specified number of hours.
AddMinutes(numminutes, datetimeThis function returns a date or time equal to the specified date or time plus the specified number of minutes.
AddYears(numyears, datetime)This function returns a date or time equal to the specified date or time plus the specified number of years.
AddMonths(nummonths, datetime)

This function returns a date or time equal to the specified date or time plus the specified number of months.

For example, if the result goes past the last day of the month (like February), this function returns the last day of the month.

CurrentDate() This function returns the current date.
CurrentDateTime()This function returns the current date or time.
Date(datetime)This function returns the date portion (with no time) of the date/time value.
DayDifference(earlierdatelaterdate)This function returns the number of days between the two dates.
DayDifferenceInSession(earlierdatelaterdate, location)

This function returns the number of in-session days between the two specified dates, using the specified location's track (calendar configuration). If the location parameter is EMPTY, the system-wide track is used. Essentially, this function skips any days not in session (like weekends, holidays, etc.) to arrive at the final number.

For example, the difference between Friday and the Monday after is one (assuming Monday is in session).

DayDifferenceInSessionForTrack(earlierdatelaterdate, track)

This function returns the number of in-session days between the two specified dates, using the specified track (calendar configuration). If the track parameter is EMPTY, the system-wide track is used. Essentially, this function skips any days not in session (like weekends, holidays, etc.) to arrive at the final number.

For example, the difference between Friday and the Monday after is one (assuming Monday is in session).

DateDay(datetime)This function returns the numeric day (1-31) extracted from the specified date.