Description 

The following date formats may be used with the Format function. Date formats may be combined to create the user defined date format. User defined date formats may not be combined with other user defined formats or predefined formats. 


Parameters

Description

insert localized time separator 

insert localized date separator 

insert ddddd ttttt, insert date only if t=0, insert time only if d=0 

insert day number without leading zero 

dd 

insert day number with leading zero 

ddd 

insert abbreviated day name 

dddd 

insert full day name 

ddddd 

insert date according to Short Date format 

dddddd 

insert date according to Long Date format 

insert day of week number 

ww 

insert week of year number 

insert month number without leading zero 
insert minute number without leading zero (if follows h or hh) 

mm 

insert month number with leading zero 
insert minute number with leading zero (if follows h or hh) 

mmm 

insert abbreviated month name 

mmmm 

insert full month name 

insert day of year number 

yy 

insert year number (two digits) 

yyyy 

insert year number (four digits, no leading zeros) 

insert quarter number 

insert hour number without leading zero 

hh 

insert hour number with leading zero 

insert minute number without leading zero 

nn 

insert minute number with leading zero 

insert second number without leading zero 

ss 

insert second number with leading zero 

ttttt 

insert time according to time format 

AM/PM 

use 12 hour clock and insert AM (hours 0 to 11) and PM (12 to 23) 

am/pm 

use 12 hour clock and insert am (hours 0 to 11) and pm (12 to 23) 

A/P 

use 12 hour clock and insert A (hours 0 to 11) and P (12 to 23) 

a/p 

use 12 hour clock and insert a (hours 0 to 11) and p (12 to 23) 

AMPM 

use 12 hour clock and insert localized AM/PM strings 

\c 

insert character c 

"text" 

insert literal text