javascript format date yyyy-mm-dd
let today = new Date()
today.toISOString().split('T')[0]
javascript format date yyyy-mm-dd
let today = new Date()
today.toISOString().split('T')[0]
javascript format date mm/dd/yyyy
function pad2(n) {
return (n < 10 ? '0' : '') + n;
}
var date = new Date();
var month = pad2(date.getMonth()+1);//months (0-11)
var day = pad2(date.getDate());//day (1-31)
var year= date.getFullYear();
var formattedDate = month+"/"+day+"/"+year;
alert(formattedDate); //03/02/2021
javascript date format mm/dd/yyyy
var date_format = new Date();
document.write(innerHTML = date_format.getMonth()+'/'+ date_format.getDate()+'/'+date_format.getFullYear());
javascript date format dd-mm-yyyy
var date_format = new Date();
document.write(innerHTML = date_format.getMonth()+'-'+ date_format.getDate()+'-'+date_format.getFullYear());
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