I'm trying to use Angular's date/time formatting with this string
2015-01-20 16:49:07+00:00
{{ myDate | date : 'medium' }}
However, it doesn't seem to be working? Is the original string messed up?
According to the angular date filter docs:
Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
You'll notice that for an ISO 8601 date, you need a T before the time:
"2015-01-20T16:49:07+00:00"
The correct usage is:
{{ date_expression | date : format }}
To check all format options check the docs
| date ...part and just leave it as{{ myDate }}what comes out?