The Date toString()
method returns the date and time with time-zone information.
The time is typically indicated in 24-hour notation (hours ranging from 0 to 23).
dateObj.toString()
let x = new Date(); console.log(x);// ww w . j a va 2 s .co m let s = x.toString(); console.log(s);