Start » Filter Reference » System » Time » CurrentDateTime
Module: | FoundationLite |
---|
Returns a string containing the date time information in selected format and all of the date time data separately.
Name | Type | Description | |
---|---|---|---|
inFormat | String | Date time string format | |
outDateTimeString | String | Date time string | |
outDateTime | DateTime |
Description
inFormat string containing any combination of regular characters and special format specifiers. These format specifiers are replaced by the function to the corresponding values to represent the time. They all begin with a percentage (%) sign, and are:
specifier | Replaced by | Example |
---|---|---|
%a | Abbreviated day of the week name * | Thu |
%A | Full day of the week name * | Thursday |
%b | Abbreviated month name * | Aug |
%B | Full month name * | August |
%c | Date and time representation * | Thu Aug 23 14:55:02 2001 |
%d | Day of the month (01-31) | 23 |
%H | Hour in 24h format (00-23) | 14 |
%I | Hour in 12h format (01-12) | 02 |
%j | Day of the year (001-366) | 235 |
%m | Month as a decimal number (01-12) | 08 |
%M | Minute (00-59) | 55 |
%p | AM or PM designation | PM |
%S | Second (00-61) | 02 |
%U | Week number with the first Sunday as the first day of week one (00-53) | 33 |
%w | Day of the week as a decimal number with Sunday as 0 (0-6) | 4 |
%W | Week number with the first Monday as the first day of week one (00-53) | 34 |
%x | Date representation * | 08/23/01 |
%X | Time representation * | 14:55:02 |
%y | Year, last two digits (00-99) | 01 |
%Y | Year | 2001 |
%Z | Timezone name or abbreviation | CDT |
%z | Timezone offset in ±HHMM format | +0200 |
%% | A % sign | % |
* The specifiers whose description is marked with an asterisk (*) are locale-dependent.
The other parameters are calendar date and time broken down into its components as integers.
Name | Meaning | Range |
---|---|---|
outDateTime.Milliseconds | Milliseconds | [0-999] |
outDateTime.Seconds | Seconds | [0-60] * |
outDateTime.Minutes | Minutes | [0-59] |
outDateTime.Hour | Hour in 24h format | [0-23] |
outDateTime.DayOfMonth | Day of the month | [1-31] |
outDateTime.Month | Month as a decimal number | [1-12] |
outDateTime.Year | Year | |
outDateTime.DayOfWeek | Day of the week as a decimal number with Sunday as 0 | [0-6] |
outDateTime.DayOfYear | Day of the year | [1-366] |
outDateTime.TimezoneOffset | Offset relative to UTC in seconds (negative value for positive time zone). | |
outDateTime.DaylightSaving | Whether current local time is subject to Daylight Saving. | |
outDateTime.UnixTime | Number of seconds that have elapsed since the Unix epoch. |
* Number of seconds is usually in range [0-59], value 60 is only present because of leap seconds.
Examples
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Incorrect date time format Provided incorrect date time format. Please refer to the official documentation for more information. |
Complexity Level
This filter is available on Basic Complexity Level.