Answers for "yyyy-MM-dd'T'HH:mm:ss'Z' in javascript"

4

javascript format date yyyy-mm-dd

let today = new Date()
today.toISOString().split('T')[0]
Posted by: Guest on August-27-2020
2

java script print date in YYYY-MM-DD HH:MM:SS format

let date_ob = new Date();

// adjust 0 before single digit date
let date = ("0" + date_ob.getDate()).slice(-2);

// current month
let month = ("0" + (date_ob.getMonth() + 1)).slice(-2);

// current year
let year = date_ob.getFullYear();

// current hours
let hours = date_ob.getHours();

// current minutes
let minutes = date_ob.getMinutes();

// current seconds
let seconds = date_ob.getSeconds();

// prints date & time in YYYY-MM-DD HH:MM:SS format
console.log(year + "-" + month + "-" + date + " " + hours + ":" + minutes + ":" + seconds);
Posted by: Guest on March-02-2020
0

yyyy-MM-dd'T'HH:mm:ss'Z' in javascript

2021-08-25T04:11:23.576
Posted by: Guest on August-25-2021
0

yyyy-MM-dd'T'HH:mm:ss'Z' in javascript

2021-08-25T04:11:23.576
Posted by: Guest on August-25-2021

Code answers related to "yyyy-MM-dd'T'HH:mm:ss'Z' in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language