Symbol | Description |
m | Output the month’s number (1–12). |
mm | Output a leading zero if the month number is less than 10. |
mmm, Mmm, MMM | Output the three-letter abbreviation for the month depending on the case of the Ms (for example, jan, Jan, JAN). |
mmmm, Mmmm, MMMM | Output the name of the full month depending on the case of the Ms (for example, january, January, JANUARY). |
d | Output the day number (1–31). |
dd | Output a leading zero if the day number is less than 10. |
ddd, Ddd, DDD | Output the three-letter day abbreviation depending on the case of the Ds (for example, mon, Mon, MON). |
dddd, Dddd, DDDD | Output the name of the full day depending on the case of the Ds (for example, monday, Monday, MONDAY). |
yy | Output the last two digits of the year. |
yyyy | Output the full four digits of the year. |
J | Output the Julian value for the date. The Julian value is the number of days since 4712 BC. |
\ - . : , (space) | Special characters used to separate the parts of a date. |
\ | Output the next character. For example, if the mask is mm/dd/yyyy \A\D, the value appears as 10/01/2003 AD in the text file. |
"string", 'string' | Output the string in the text file. |
Date | Mask | Value |
2003-10-01 | yyyy-mm-dd | 2003-10-01 |
m/d/yy | 10/1/03 | |
Ddd, Mmm dd, yyyy | Fri, Oct 01, 2003 |