Format User Defined Date

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.

Parameter Description:

Parameters

Description

:

Insert localized time separator.

/

Insert localized date separator.

c

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

d

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.

w

Insert day of week number.

ww

Insert week of year number.

m

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

q

Insert quarter number

y

Insert day of year number

yy

Insert year number (two digits)

yyyy

Insert year number (four digits, no leading zeros)

h

Insert hour number without leading zero

hh

Insert hour number with leading zero

n

Insert minute number without leading zero

nn

Insert minute number with leading zero

s

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