CURRENT_DATE
Syntax
CURRENT_DATE([format])
Parameters
format
One of the keywords in the following table specifying the date format of date_string.
Description
CURRENT_DATE returns the current date in format. The date is determined by the clock on the IBM® server. If no format keyword is supplied, the default of DELIM_M_D_Y is used.
For all recommended databases, IBM® Campaign attempts to run the CURRENT_DATE macro in the database using a database-supported current time SQL call (e.g., SYSDATE, GETDATE, DATE, or TODAY). In these cases, all parameters (including the format of the date) of this macro function are ignored and the output includes whatever is returned by the database (e.g., a time component may be included in the output). If this occurs and you want to return just the date or the date in a different format, you can write your own custom macro using raw SQL or use other IBM® macros. For example:
DATE_STRING(CURRENT_JULIAN( ), ...)
In some cases, the CURRENT_DATE() macro is run on the IBM® Campaign server (e.g., if running against a flat file, against a non-recommended database with no equivalent SQL support, or if the Campaign macro expression cannot be resolved in the database). In these cases, all parameters are recognized and the output is returned in the selected format.
*
This macro is available in IBM® Interact.
Examples
If the date today is the 7th of September, 2000, CURRENT_DATE() returns "09/07/00".
Related Functions