I was given data.json
file with the dates in the following format:
"creationTime": 1542111235544,
"creationTime": 1545880457898,
Which translated to:
13/11/2018, 13:13:55
27/12/2018, 04:14:17
by doing:
new Date(ticket.creationTime).toLocaleString()
How can I do the backward operation? For example, if I have a date as:
27/09/2014
How can I get the code like in the others? The time is optional (I can add 00:00 am if needed)
Thanks a lot