Format picture strings are used to format the display of times and dates. This is used by the template tool and by the insert time and date menu functions. This information is from the Windows API Programmer's Reference.

For Time

Use the following elements to construct a format picture string. If you use spaces to separate the elements in the format string, then these spaces will appear in the same location in the output string. The letters must be in uppercase or lowercase as shown (for example, "ss", not "SS"). Characters in the format string that are enclosed in single quotation marks will appear in the same location and unchanged in the output string.

For example, to get the time string "11:29:40 PM", use the following picture string: "hh':'mm':'ss tt".

h: Hours with no leading zero for single-digit hours; 12-hour clock

hh: Hours with leading zero for single-digit hours; 12-hour clock

H: Hours with no leading zero for single-digit hours; 24-hour clock

HH: Hours with leading zero for single-digit hours; 24-hour clock

m: Minutes with no leading zero for single-digit minutes

mm: Minutes with leading zero for single-digit minutes

s: Seconds with no leading zero for single-digit seconds

ss: Seconds with leading zero for single-digit seconds

t: One character time marker string, such as A or P

tt: Multicharacter time marker string, such as AM or PM

For Dates

Use the following elements to construct a format picture string. If you use spaces to separate the elements in the format string, then these spaces will appear in the same location in the output string. The letters must be in uppercase or lowercase as shown in the table (for example, "MM" not "mm"). Characters in the format string that are enclosed in single quotation marks will appear in the same location and unchanged in the output string.

For example, to get the date string "Wed, Aug 23 06", use the following picture string: "ddd',' MMM dd yy".

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. The function uses the LOCALE_SABBREVDAYNAME value associated with the specified locale.

dddd: Day of week as its full name. The function uses the LOCALE_SDAYNAME value associated with the specified locale.

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. The function uses the LOCALE_SABBREVMONTHNAME value associated with the specified locale.

MMMM: Month as its full name. The function uses the LOCALE_SMONTHNAME value associated with the specified locale.

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.

gg: Period/era string. The function uses the CAL_SERASTRING value associated with the specified locale. This element is ignored if the date to be formatted does not have an associated era or period string.