192
rated 0 times
[
193]
[
1]
/ answers: 1 / hits: 20134
/ 8 Years ago, mon, march 7, 2016, 12:00:00
Desired return value should be a string formatted as dd-mm-yyyy
.
Im trying to give a format date dd-mm-yyyy to ISOString and adding GMT but the code gives me this format. How can i do?
new Date().toISOString()
.replace(/T/, ' '). // replace T with a space
.replace(/..+/, ''); // delete the dot and everything after
'2012-11-04 14:55:45'
More From » date