RE: Date parsing question...
RE: Date parsing question...
- Subject: RE: Date parsing question...
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Tue, 28 Oct 2003 16:04:40 -0500
NSCalendarDate *sixPMOrSo = [NSCalendarDate
dateWithString:@"20031028180309 "
calendarFormat:@"%Y%m%d%H%M%S"];
NSCalendarDate *retainedSixPMOrSo = [[NSCalendarDate alloc]
initWithString:@"20031028180309 "
calendarFormat:@"%Y%m%d%H%M%S"];
For dateWithString, the docs say (albeit badly) that your date string must
be in the format YYYY-MM-DD HH:MM:SS ?HHMM. dateWithNaturalLanguageString
requires a string in a format that normal people use, e.g., 10/28/2003 or
28/10/2003. Computer people don't count as "normal," although maybe they
should. File a bug report if you think dateWithNaturalLanguageString should
recognize YYYYMMDDHHmmss.
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Daniele M.
>
Sent: Tuesday, October 28, 2003 1:09 PM
>
To: email@hidden
>
Subject: Date parsing question...
>
>
>
hello, I have a string like this 20031028180309 (it's a date:
>
2003/10/28 18:03:09). I have tried to parse it using dateWithString and
>
dateWithNaturalLanguage...but with null/wrong result. Is there a method
>
to parse it?
>
>
thx
>
daniele
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.