I have next date string,
2011-08-30T11:44:54.345-04:00
Help me to compose right format to parse it with dateFromString:
I have next date string,
2011-08-30T11:44:54.345-04:00
Help me to compose right format to parse it with dateFromString:
You need to eliminate the last colon (timezone, "-04:00" -> "-0400"), as
Z
will take something like "-0800", then you can give this a try:For more information on date formatting, refer to this page.
http://cocoawithlove.com/2009/05/simple-methods-for-date-formatting-and.html
This link will provide a best date formatting examples.
This is following the tilo's answer but with few things added.
You would get the required format.