Functions

date

Supported By

Syntax

the [modifier] date

date ()

Modifier is short, abbreviated, long, or English. The default is short.

Example

put the last word of the long date into currentYear

Description

The date function returns a date representing the current date. There are four forms of the date function:

the short date 20/7/93
the abbrev date Tue 20 Oct 1992
the long date Tuesday 7 October 1989
the English date Saturday, February 15, 1986

Notes

The format of the date is dependent on the current locale. This is important if you want to write scripts that work anywhere without modification. You cannot assume that the date function will always return a date in the same format.

To prevent issues caused by differing local date formats, use the seconds or the dateItems to store and perform calculations with dates and times.

See Also

convert, dateItems, seconds, ticks, time