• 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: NSTimestampFormatter question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimestampFormatter question


  • Subject: Re: NSTimestampFormatter question
  • From: Ken Anderson <email@hidden>
  • Date: Thu, 26 Mar 2009 16:21:31 -0400

Dom,

Are you absolutely sure you're using the percent format instead of the yyyy-MM-dd format? It looks like you switched from Simple to NSTimestamp formatters without changing the format string...

Ken

On Mar 26, 2009, at 4:05 PM, Dom wrote:

I know that this is deprecated in WO5.4, but I have a source timestamp string that looks like this: 2009-03-26 15:56:50-0400
and I'm trying to create a formatter with the following pattern: %Y- %m-%d %H:%M:%S%z


and I'm getting an Illegal arguement exception: Invalid pattern yyyy'-'MM'-'dd' 'HH':'mm':'sszzzz when I try parsing the input string into an NSTimestamp.

At first I tried just using the normal SimpleDateFormat class in java, but apparently there's an issue with the "-" characters and so I thought I'd revert to using NSTimestampFormatter to get past this issue.

Am I doing something wrong? OK, dumb question. What am I doing wrong? ;-)

Thanks,

Dom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSTimestampFormatter question (From: Dom <email@hidden>)

  • Prev by Date: Re: newEO.localInstanceIn(localEditingContext)
  • Next by Date: Re: newEO.localInstanceIn(localEditingContext)
  • Previous by thread: NSTimestampFormatter question
  • Next by thread: Re: NSTimestampFormatter question
  • Index(es):
    • Date
    • Thread