A
Aparna
I need to match a given date against 5 different format. How can I do
this ?
The predefined date formats are :-
Format 1 - yyyy MMM dd hh:mm:ss a
Format 2 - yy-MM-dd hh:mm:ss
Format 3 - MMM dd yyyy hh:mm
Format 4 - dd MMM yyyy hh:mm
Format 5 - dd-MM-yy hh:mm
and If I get a date "2007 Jul 14 10:21:19 am", I need to pick the
first option ie., Format 1.
How can I go about this ? Is there any API which can determine the
date format of a string? Any help is appreciated.
-Aparna
this ?
The predefined date formats are :-
Format 1 - yyyy MMM dd hh:mm:ss a
Format 2 - yy-MM-dd hh:mm:ss
Format 3 - MMM dd yyyy hh:mm
Format 4 - dd MMM yyyy hh:mm
Format 5 - dd-MM-yy hh:mm
and If I get a date "2007 Jul 14 10:21:19 am", I need to pick the
first option ie., Format 1.
How can I go about this ? Is there any API which can determine the
date format of a string? Any help is appreciated.
-Aparna