DATE_STRING macro
The DATE_STRING
macro
is available only in Unica Campaign.
Syntax
DATE_STRING(julian_date [, 'output_format'[,
max_length]]) DATE_STRING(julian_date [, 'format_string'[, max_length]]
Parameters
julian_date
A number representing a Julian date, the number of days elapsed since January 1, 0000.
output_format
String, valid date format.
max_length
format_string
A format string optionally including any combination of the following format codes:
Code | Description |
---|---|
%a |
Abbreviated weekday name |
%A |
Full weekday name |
%b |
Abbreviated month name |
%B |
Full month name |
%c |
Date and time representation appropriate for locale |
%d |
Day of month (01 - 31) |
%H |
Hour in 24-hour format (00 - 23) |
%I |
Hour in 12-hour format (01 - 12) |
%j |
Day of year (001 - 366) |
%m |
Month (01 - 12) |
%M |
Minute (00 - 59) |
%p |
Current® locale's AM/PM indicator for 12-hour clock |
%S |
Second (00 - 59) |
%U |
Week of year, with Sunday as first day of week (00 - 51) |
%w |
Weekday (0 - 6; Sunday is 0) |
%W |
Week of year, with Monday as first day of week (00 - 51) |
%x |
Date representation for current locale |
%X |
Time representation for current locale |
%y |
2-digit year (00 - 99) |
%Y |
4-digit year. The preceding zeros in the year are not truncated. For example, the year 0201 is displayed as 0201, and the year 0001 is displayed as 0001. |
%4Y |
4-digit year. The preceding zeros in the year are not truncated. For example, the year 0201 is displayed as 0201, and the year 0001 is displayed as 0001. |
%z, %Z |
Time zone name or abbreviation; no output if time zone is unknown |
%% |
Percent sign |
Description
DATE_STRING
returns the date string of the Julian date. If output_format
is not provided, the default keyword DELIM_M_D_Y
will be used.
Examples
DATE_STRING(730729)
returns the string "08/31/00".
Note: See DATE for
additional information on valid date formats.
Related functions
Function | Description |
---|---|
DATE |
Converts a date string to a Julian date. |
DATE_JULIAN |
Returns the Julian date of the input. |
DATE_FORMAT |
Converts dates from one format to another. |