Date Formatting Strings

To build a custom data format, assemble the following format codes into text strings. Format codes are case-sensitive. Text strings are always enclosed in double quotation marks.

Dates using these formatting strings will be displayed in the language of the user's locale.

Before building a date format with these strings, review the list of Date Codes (predefined).

Format Code Description
"d" Day of month as digits with no leading zero for single-digit days.
"dd" Day of month as digits with leading zero for single-digit days.
"ddd" Day of week as a three-letter abbreviation.
"dddd" Day of week as its full name.
"g" B.C. or A.D.
"M" Month as digits with no leading zero for single-digit months.
"MM" Month as digits with leading zero for single-digit months.
"MMM" Month as a three-letter abbreviation.
"MMMM" Month as its full name.
"y" Year as last two digits, but with no leading zero for years less than 10.
"yy" Year as last two digits, but with leading zero for years less than 10.
"yyyy" Year represented by full four digits.

Example:

Date(Today(), "dddd MMM dd, yyyy")

... yields, "Thursday Aug 28, 2008"

Time Formatting Codes - Use for displaying time.

Date - The function that uses the codes listed above.