Returns the current system date/time converted to a string according to the specified formatting styles or pattern.
These functions, effectively, are the same as the corresponding calls:
time().format() time().format(pattern) time().format(dateStyle, timeStyle)
Parameters:
dateStyle
timeStyle
Specify two separate styles for both date and time representations respectively.For more details, see description for
format(Date,...)
function.
pattern
The formatting pattern.For more details, see description for
format(Date,...)
function.
Examples:
dateTime("SHORT", "LONG")
dateTime("SHORT;LONG")
Returns the current date and time formatted with the predefined short and long patterns respectively, for example:27/04/06 3:30:32pm
dateTime("SHORT", null)
dateTime("SHORT;")
Returns only the current date formatted with the predefined short pattern, for example:27/04/06
dateTime(null, "LONG")
dateTime(";LONG")
Returns only the current time formatted with the predefined long pattern, for example:3:30:32pm
dateTime("FULL", "FULL")
dateTime("FULL")
Returns the current date/time with both date and time formatted with the predefined full pattern, for example:Thursday, April 12, 2006 AD, 3:30:42pm PST
dateTime("SHORT", "SHORT")
dateTime("SHORT")
dateTime()
Returns the current date/time with both date and time formatted with the predefined short pattern, for example:27/04/06 3:30pm
dateTime("dd.MM.yyyy HH:mm")
Returns the current date/time formatted with the custom pattern, for example:27.04.2006 15:30
See Also:
time(), format(Date,...)