Query regarding DateFormat
Query regarding DateFormat
- Subject: Query regarding DateFormat
- From: Nishant <email@hidden>
- Date: Fri, 28 Nov 2003 18:01:52 +0000 (GMT)
Hi All,
I'm using an NSDateFormatter to display dates in an
TextField and would like to display them in the user's
system preference format.
So, I used NSShortDateFormatString.
What I have done is ::
===============
NSString *sdf = [[NSUserDefaults
standardUserDefaults]stringForKey:NSShortDateFormatString];
NSDateFormatter *prefDateFormat = [[[NSDateFormatter
alloc] initWithDateFormat:sdf
allowNaturalLanguage:YES] autorelease];
================
Now my preference is set to UK (Day/Month/Year)
When I do an NSLog(sdf) I see "-1.438324e-229/-1/Y"
instead of "%e/%m/%Y".
Am I missing something? Is there someother way to do
it?
Thanks and Regards,
Nishant
________________________________________________________________________
Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs
http://www.yahoo.co.uk/robbiewilliams
_______________________________________________
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.