Pages

Friday, June 11, 2010

Date time Format

In different environment date time format differs a little. But this little difference wastes a lot of time in cases. I am trying to put all together here.

JAVA

Date and Time PatternResult
"yyyy.MM.dd G 'at' HH:mm:ss z"2001.07.04 AD at 12:08:56 PDT
"EEE, MMM d, ''yy"Wed, Jul 4, '01
"h:mm a"12:08 PM
"hh 'o''clock' a, zzzz"12 o'clock PM, Pacific Daylight Time
"K:mm a, z"0:08 PM, PDT
"yyyyy.MMMMM.dd GGG hh:mm aaa"02001.July.04 AD 12:08 PM
"EEE, d MMM yyyy HH:mm:ss Z"Wed, 4 Jul 2001 12:08:56 -0700
"yyMMddHHmmssZ"010704120856-0700
                                                                                      Source

ORACLE

MMNumeric month (e.g.07)
MONAbbreviated month name (e.g.JUL)
MONTHFull month name (e.g.JULY)
DDDay of month (e.g.24)
DYAbbreviated name of day (e.g.FRI)
YYYY4-digit year (e.g.1998)
YYLast 2 digits of the year (e.g.98)
RRLike YY, but the two digits are ``rounded'' to a year in the range 1950 to 2049. Thus, 06 is considered 2006 instead of 1906
AM (or PM) Meridian indicator
HHHour of day (1-12)
HH24Hour of day (0-23)
MIMinute (0-59)
SSSecond (0-59)

                                                                                                                                                                    Source

I am trying to add more. Help me with your comments..

No comments:

Post a Comment