• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Date parsing question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Date parsing question...
      • From: "Alastair J.Houghton" <email@hidden>
References: 
 >Date parsing question... (From: "Daniele M." <email@hidden>)

  • Prev by Date: Re: Reporting bugs... (Was-- Re: Xcode bug)
  • Next by Date: Re: Date parsing question...
  • Previous by thread: Date parsing question...
  • Next by thread: Re: Date parsing question...
  • Index(es):
    • Date
    • Thread