Re: [iPhone] Convert date string to a NSDate object
Re: [iPhone] Convert date string to a NSDate object
- Subject: Re: [iPhone] Convert date string to a NSDate object
- From: Tharindu Madushanka <email@hidden>
- Date: Fri, 8 Jan 2010 16:01:00 +0530
Just found the answer from Date Formatting Prog. Guide.. Format Strings
section..
NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init];
[inputFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss'Z'"];
NSDate *formatterDate = [inputFormatter dateFromString:@
"2010-01-08T08:09:20Z"];
Thank you,
Tharindu
On Fri, Jan 8, 2010 at 1:58 PM, Tharindu Madushanka
<email@hidden>wrote:
> Hi,
>
> I am having a time stamp string like 2010-01-08T08:09:20Z
>
> I would like to know how I could convert this to a represented NSDate
> object.. Is it possible to do this without separating the string into
> several parts..
>
> Thank you and Kind Regards,
>
> tharindufit.wordpress.com
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden