format date in javascript
const formatDate = date => {
return (
date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
);
};
console.log(formatDate(new Date()));
format date in javascript
const formatDate = date => {
return (
date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
);
};
console.log(formatDate(new Date()));
javascript date format mm/dd/yyyy
var date_format = new Date();
document.write(innerHTML = date_format.getMonth()+'/'+ date_format.getDate()+'/'+date_format.getFullYear());
Format Date Javascript
const dateStr = '2020-06-21T10:15:00Z',
[yyyy,mm,dd,hh,mi] = dateStr.split(/[/:\-T]/)
console.log(`${dd}-${mm}-${yyyy} ${hh}:${mi}`)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us