6

I have date in ISO-format like:

2016-02-17T16:40:30

How can I convert it to a human-readable date, for example:

17 Feb 2016 16:40
Maccath
  • 3,771
  • 4
  • 25
  • 42
yoram
  • 151
  • 1
  • 1
  • 13

1 Answers1

20

First of all, you need to create a date using your original date string.

var d = new Date('2016-02-17T16:40:30');

And then you can use this to fetch a readable date format:

d.toDateString();

Will return:

Wed Feb 17 2016

Maccath
  • 3,771
  • 4
  • 25
  • 42