Declaring


let dtDate = new Date(); 
let dtDate = new Date(value);
let dtDate = new Date(datestring);
let dtDate = new Date(year, month [,day [,hour [,minutes [,seconds [,milliseconds]]]]]);
let dtDate = new Date(milliseconds)

let dtDate = new Date(2021, 11, 24); // 3 numbers are year, month, day
let dtDate = new Date(2021, 11, 24, 10); // 4 numbers are year, month, day, hour
let dtDate = new Date("2021-03-21");
let dtDate = new Date("2021-06");
let dtDate = new Date("2021");
let dtDate = new Date("03/25/2021"); // always include leading spaces
let dtDate = new Date("Mar 25 2021");
let dtDate = new Date("25 Mar 2021"); // month and day can be in any order
let dtDate = new Date("October 13, 2021 11:13:00");
let dtDate = new Date(2021, 11, 24, 10, 33, 30, 0);




© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext