Tang
Tang

Reputation: 685

Convert from String to date

I want to convert a string like "2012-03-08T00:00:00+01:00" into Date..

I tried to use Dateformatter with "YYYY-MM-dd HH:mm" but it doesn't work (error while parsing).

Any idea ?

Thanks a lot.

Upvotes: 1

Views: 250

Answers (1)

Snicolas
Snicolas

Reputation: 38168

This pattern should match : yyyy-MM-dd'T'HH:mm:ssZ

Upvotes: 3

Related Questions