DateTime Library Objects
Function / Event |
Return Value |
Description |
Syntax |
Date and Time |
|||
Add Days to Date |
DateTime |
Adds a specified number of days to the date value and returns a new date. |
Add <Days> To <Date> |
Add Hours |
DateTime |
Adds a specified number of hours to the date value and returns a new date. |
Add <hours> to <datetime> |
Add Minutes |
DateTime |
Adds a specified number of minutes to the date value and returns a new date. |
Add <minutes> to <datetime> |
Add Months |
DateTime |
Adds a specified number of months to the date value and returns a new date. |
Add <Months> To <Date> |
Add Years |
DateTime |
Adds a specified number of Years to the date value and returns a new date. |
Add <Years> To <Date> |
Convert to Time Zone |
DateTime |
Offsets the specified DateTime value according to the specified Time Zone. The values to use for Time Zone are specified by the MSDN function system.timezoneinfo.findsystemtimezonebyid. Click here to see details and an example. (This link was active at the time of this publication. It is not maintained by NICE.) |
Convert <Time> To <Time Zone> |
Convert to Universal Time |
DateTime |
Offsets the specified DateTime value to GMT. |
Convert To <Time> Universal Time |
Convert Text to Datetime |
DateTime |
Converts the given date in text to the standard DateTime format. For example, specify the date as 20191212. The format for this date is yyyyMMdd. When you execute the Convert Text to Datetime function, it converts the date from the given format to the standard datetime format: 12/12/2019 12:00:00 AM |
Convert <inputdate> by <format> to DateTime |
Current Date |
|
Retrieves the current date. |
Current Date |
Day Of Date |
Number |
Retrieves the day of the specified date. |
Day Of <Date> |
Day Of The Week At |
Number |
Retrieves the numeric value of the day of the week in a specified date (for example, 3 for Tuesday). |
Day Of The Week At <Date> |
Days Difference |
Number |
Calculates the difference in days between the two date values. |
Days Difference Between <Later Date> and <Earlier Date> |
Format a Date to Given Valid Format |
Text |
Converts a date to the given format. All the valid custom date formats are allowed. For example, Date: 1/21/2019 Format: "dddd, dd MMMM yyyy" Result: Monday, 21 January 2019 Date:- 1/21/2019 10:30AM Format: "dd/MMM/yyyy HH:mm" Result: 21/Jan/2019 10:30 For more details refer to: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings |
Format a <Date> to given valid format <Format> |
Get Date |
DateTime |
Gets the date of the specified values. |
Get Date From <Day> <Month> And <Year> |
Hour Of Date |
Number |
Retrieves the hour of the specified time. |
Hour Of <Date> |
Hours Difference |
Number |
Calculates the difference, in hours, between the two date and time values. |
Hours Difference Between <Later Date> And <Earlier Date> |
Minute Of Date |
Number |
Retrieves the minute of the specified time. |
Minute Of <Date> |
Minutes Difference |
Number |
Calculates the difference, in minutes, between the two date and time values. |
Minutes Difference Between <Later Date> And <Earlier Date> |
Month Of Date |
Number |
Retrieves the month of the specified date. |
Month Of <Date> |
Name Of The Current Day Of The Week At |
Text |
Retrieves the name of the current day of the week in a specified date. |
Name Of The Current Day Of The Week At <Date> |
Second Of Date |
Number |
Retrieves the second of the specified time. |
Second Of <Date> |
Seconds Difference |
Number |
Calculates the difference, in seconds, between the two date and time values. |
Seconds Difference Between <Later Date> And <Earlier Date> |
Subtract Days From Date |
DateTime |
Subtracts the specified number of days from the date value and returns a new date. |
Subtract <Days> From <Date> |
Year Of Date |
Number |
Retrieves the year of the specified date. |
Year Of <Date> |