Answers for "javascript to datetime"

19

javascript get current time

var today = new Date();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
Posted by: Guest on March-30-2020
1

js read date from milliseconds

const miliseconds = 1604395966369;

const date = new Date(miliseconds);
Posted by: Guest on November-03-2020
3

datetime to date javascript

var currentDate = new Date();

var date = currentDate.getDate();
var month = currentDate.getMonth(); //Be careful! January is 0 not 1
var year = currentDate.getFullYear();

var dateString = date + "-" +(month + 1) + "-" + year;
Posted by: Guest on April-16-2020
0

convert javascritp getTime() to datetime

var time = new Date().getTime(); // get your number
var date = new Date(time); // create Date object

console.log(date.toString()); // result: Wed Jan 12 2011 12:42:46 GMT-0800 (PST)
Posted by: Guest on April-18-2021

Code answers related to "javascript to datetime"

Code answers related to "Javascript"

Browse Popular Code Answers by Language