Date and time
Date and time functions let you perform a variety of different tasks with date, datetime, or time data.
For example, you can calculate the number of days between two dates, extract portions of a date, such as just the month, or find out the day of the week that corresponds to each date.
Function descriptions
Function | Description |
---|---|
Returns the age, in days, of a specified date compared to a specified cutoff date, or the current operating system date. |
|
Returns the name of the day of the week for a specified date or datetime. Abbreviation for "Character Day of Week". |
|
Returns the name of the month of the year for a specified date or datetime. Abbreviation for "Character Month of Year". |
|
Converts a character or numeric date value to a date. Can also extract the date from a character or numeric datetime value and return it as a date. Abbreviation for "Character to Date". |
|
Converts a character or numeric datetime value to a datetime. Abbreviation for "Character to Datetime". |
|
Converts a character or numeric time value to a time. Can also extract the time from a character or numeric datetime value and return it as a time. Abbreviation for "Character to Time". |
|
Extracts the date from a specified date or datetime and returns it as a character string. Can also return the current operating system date. |
|
Converts a datetime to a character string. Can also return the current operating system datetime. |
|
Extracts the day of the month from a specified date or datetime and returns it as a numeric value (1 to 31). |
|
Returns a numeric value (1 to 7) representing the day of the week for a specified date or datetime. Abbreviation for "Day of Week". |
|
Returns the date of the last day of the month that is the specified number of months before or after a specified date. |
|
Returns the date that is the specified number of months before or after a specified date. |
|
Extracts the hour from a specified time or datetime and returns it as a numeric value using the 24-hour clock. |
|
Returns the maximum value in a set of numeric values, or the most recent value in a set of datetime values. |
|
Returns the minimum value in a set of numeric values, or the oldest value in a set of datetime values. |
|
Extracts the minutes from a specified time or datetime and returns it as a numeric value. |
|
Extracts the month from a specified date or datetime and returns it as a numeric value (1 to 12). |
|
Returns the current operating system time as a Datetime data type. |
|
Extracts the seconds from a specified time or datetime and returns it as a numeric value. |
|
Converts a serial date – that is, a date expressed as an integer – to a date value. Abbreviation for "Serial to Date". |
|
Converts a serial datetime – that is, a datetime expressed as an integer, and a fractional portion of 24 hours – to a datetime value. Abbreviation for "Serial to Datetime". |
|
Converts a serial time – that is, a time expressed as a fractional portion of 24 hours, with 24 hours equaling 1 – to a time value. Abbreviation for "Serial to Time". |
|
Extracts the time from a specified time or datetime and returns it as a character string. Can also return the current operating system time. |
|
Returns the current operating system date as a Datetime data type. |
|
Converts a Unicode string containing a formatted date to an Analytics date value. Abbreviation for "Unicode to Date". |
|
Returns the number of workdays between two dates. |
|
Extracts the year from a specified date or datetime and returns it as a numeric value using the YYYY format. |