Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.programmer.help > #2

NSDateFormatter help

Path csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Jim <jim@magrathea.plus.com>
Newsgroups comp.sys.mac.programmer.help
Subject NSDateFormatter help
Date Wed, 9 Mar 2011 13:15:19 +0000
Lines 22
Approved The Culture
Message-ID <slrninevb7.2c09.jim@wotan.magrathea.local> (permalink)
X-Trace individual.net dj0O9OyplXkRjQTpVZrPmw6PvHh1+KCWgtOl0o6nUbQpQcw99M
X-Orig-Path wotan.magrathea.local!nobody
Cancel-Lock sha1:kbcpEOGa30aOJkRN5OzuNDOLXf8=
User-Agent slrn/0.9.8.1 (FreeBSD)
Xref x330-a1.tempe.blueboxinc.net comp.sys.mac.programmer.help:2

Show key headers only | View raw


I've got an NSString that contains a date/time. An actual example of
this is:

1230 UT 09 Mar 2011


I'm trying to get this into an NSDate object, and I *thought* that the
formatter should be: "HHmm z dd MMM yyyy" but this always returns a bad
date. I've tried various z's (up to four) and I've tried using a few
other things but something isn't right.

What *should* the formatter be?

(this is my first real attempt at using NSDateFormatter so I'm probably
doing something silly)

Jim
-- 
Twitter:@GreyAreaUK       Facetime ID:jim@magrathea.plus.com

"[Angry Birds is] marginally more addictive than a compound of crack cocaine,
 strong tobacco and powdered orgasms." - The Daily Mash

Back to comp.sys.mac.programmer.help | Previous | NextNext in thread | Find similar


Thread

NSDateFormatter help Jim <jim@magrathea.plus.com> - 2011-03-09 13:15 +0000
  Re: NSDateFormatter help Tom Harrington <tph@pcisys.no.spam.dammit.net> - 2011-03-09 09:41 -0700
    Re: NSDateFormatter help Jim <jim@magrathea.plus.com> - 2011-03-09 16:48 +0000

csiph-web