Returns the current system date converted to a string according to the specified formatting pattern (or style).
Parameter:
pattern
The formatting pattern.For more details about the date patterns, see description for
format(Date,...)
function.Note: Instead of a pattern, it is also possible to specify in this parameter the name of one of the predefined date styles:
For more details about the styles, see description for"SHORT", "MEDIUM", "LONG", "FULL"
format(Date,...)
function.Note: If this parameter is
null
, empty string or not specified at all, the"SHORT"
style will be used by default to format the date.
Examples:
date()
date("SHORT")
Returns the current date formatted with the predefined short pattern, for example:27/04/06
date("MEDIUM")
Returns the current date formatted with the predefined long pattern, for example:Apr 27, 2006
dateTime("dd.MM.yyyy")
Returns the current date formatted with the custom pattern, for example:27.04.2006
See Also:
time(), dateTime(), format(Date,...)