Joan
Joan

Reputation: 243

No way to transform this Format Date into another Javascript Moment.js

I am using Moment.js to dates, and I need to change one format to another one, and currently is being difficult.

The one I have is this: 2017-09-12T01:11:48+02:00

And the format I want is like this one: Thu Oct 05 2017 12:20:00 GMT+0200

I'm sorry if you think this question is "to avoid the search", but I've been searching for a long while.

Thanks a lot!

Upvotes: 0

Views: 27

Answers (1)

shawon191
shawon191

Reputation: 1955

moment().format('ddd MMM D YYYY, H:mm:ss [GMT]Z')

You can find about it right in moment documentation. https://momentjs.com/docs/#/parsing/string-format/

Upvotes: 1

Related Questions