Ive been racking my brains with no luck. Could someone please tell me how i would convert this string:
"2011-01-13T17:00:00+11:00"
into a NSDate?
Ive been racking my brains with no luck. Could someone please tell me how i would convert this string:
"2011-01-13T17:00:00+11:00"
into a NSDate?
Did you try this
Cheers
Try using this cocoapods enabled project. There are many added functions that will probably be needed as well.
"A category to extend Cocoa's NSDate class with some convenience functions."
https://github.com/billymeltdown/nsdate-helper
Here's an example from their page:
put the T part in single quotes, and check the unicode docs for the exact formatting. In my case, I have something similar, which I do this:
Again, not exactly the same, but you get the idea. Also, be careful of the timezones when converting back and forth between strings and nsdates.
Again, in my case, I use:
The unicode date format doc is here
Also, for your situation, you could try this:
Hope this helps.
You might check out TouchTime.
https://github.com/jheising/TouchTime.
It's a direct port of the awesome strtotime function in PHP in 5.4 for Cocoa and iOS. It will take in pretty much any arbitrary format of date or time string and convert it to an NSDate.
Hope it works, and enjoy!