Date and Time

Top  Previous  Next

 

Date and time expressions insert Dates, Times, and various representations of those dates and times.

lamp Important: The values inserted are calculated using the date and time returned by your computer at the point at which the script is processed. If the clock on your computer is not set to your current locale, the dates and times could be different to those you expect.  If you are using a different Locale (for example if you are in the UK but your locale is set to US then the format of the strings could also be different to expectations.

 

Expression

Inserts

 

%%Day%%

The day of the month as a number

 

%%DayName%%

The day of the month as a string, for example 'Monday'

 

%%FileNameDate%%

The short format date modified for inclusion in a file name.

 

%%FileNameTime%%

The short format Time modified for inclusion in a file name.

 

%%LongDate%%

The date on which the script was loaded formatted using the long date format specified for the computer in use.

 

%%LongTime%%

The Time on which the script was loaded formatted using the long time format specified for the computer in use.

 

%%Month%%

The month of the year as a number

 

%%MonthName%%

The month of the year as a string, for example 'January'

 

%%ShortDayName%%

The short day of the month as a string, for example 'Mon'

 

%%ShortMonthName%%

The short month of the year as a string, for example 'Jan'

 

%%SqlDate%%

The date and time in SQL format

 

%%SqlFileNameDate%%

The date and time in SQL format modified for inclusion in a file name.

 

%%Time%%

The Time on which the script was loaded formatted using the short time format specified for the computer in use.

 

%%Today%%

The date on which the script was loaded formatted using the short date format specified for the computer in use.

     

%%Year%%

The year as a number, for example '2021'

 

%%YearInWords%%

The year in English words, for example 'Two thousand and twenty one'

 

 

See Also: Folder Locations Special Folder Locations Special Characters Other Expressions