Reputation: 55
I'm unable to parse date in angularjs, where date is coming from database and instead of showing correct date which is in database, it is showing me '0001-01-01T00:00:00'.Do I need to convert it? Is there any way in angular that convert the date.?
Upvotes: 0
Views: 1940
Reputation: 2178
'0001-01-01T00:00:00' is a unix format (ISO 8601 or another). This format is natively supported by javascript.
If you want to convert it in a readable date, do :
var myDate = new Date('0001-01-01T00:00:00')
Upvotes: 1