Format Character | Display | Description |
d | 7 | Single digit representation of the day of the month |
dd | 07 | Double digit representation of the day of the month |
ddd | Sun | Short Abbreviation of the day of the week |
dddd | Sunday | Day of the week |
M | 8 | display one-digit month number |
MM | 08 | display two-digit month number |
MMM | Aug | Short Abbreviation of the Month |
MMMM | August | Month in full form |
y | 1 | Last digit of the year |
yy | 11 | Last two digits of the year |
yyyy | 2011 | Full year from (0001-9999) |
f | sunday, august 07, 2011 9:30 AM | Full date short time |
F | sunday, august 07, 2011 9:30:15 AM | Full Date Full Time |
g | 8/7/2011 9:30 AM | General Date Short Time |
gg | A.D. | Show current Era |
G | 8/7/2011 9:30:15 AM | General Date Long Time |
o | 2011-08-07T09:30:15.0000000 | Represent time zone information |
O | 2011-08-07T09:30:15.0000000 | Represent time zone information |
h | 9 | display one-digit hour on 12-hour scale |
H | 9 | Hour(12 hour format) no zero in front |
Hh | 09 | Two Digit hour (12 hour format). Zero in front |
HH | 09 | Hour (24 hour format) |
m | 3 | minute with no zero in front |
mm | 30 | minute with zero in front |
s | 1 | second with no zero in front |
ss | 15 | second with zero in front |
t | 9:30 AM | Short Time(No Seconds) with AM/PM |
T | 9:30:15 AM | Full Time(With Seconds) with AM/PM |
tt | AM | A = AM, P = PM |
u | 2011-08-07 09:30:15Z | Universal Sortable Time Format |
U | sunday, august 07, 2011 6:30:15 AM | Universal Full Time Format |
f | 0 | represents the tenths of a second in a date and time value |
ff | 02 | Represents the hundredths of a second in a date and time value. |
fff | 022 | Represents the milliseconds in a date and time value. |
ffff | 0220 | represents the ten thousandths of a second in a date and time value |
fffff | 02200 | represents the hundred thousandths of a second in a date and time value |
ffffff | 022000 | represents the millionths of a second in a date and time value |
F | 0 | represents the tenths of a second in a date and time value |
FF | 02 | represents the hundredths of a second in a date and time value |
FFF | 022 | represents the milliseconds in a date and time value |
FFFF | 022 | represents the ten thousandths of a second in a date and time value |
FFFFF | 022 | represents the hundred thousandths of a second in a date and time value |
FFFFFF | 022 | represents the millionths of a second in a date and time value |
z | +3 | Single digit representation of time zone offset |
zz | +03 | double digit representation of time zone offset |
zzz | +03:00 | Representation of time zone offset in hours and minutes |
: | 6:30:15 | The time separator |
/ or - | 8/7/2011 or 8-7-2011 | The date separator depending upon culture settings |