Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert milliseconds to dd/mm/yyyy javascript

var date = new Date(1663068540); // Date 2011-05-09T06:08:45.178Z
var year = date.getFullYear();
var month = ("0" + (date.getMonth() + 1)).slice(-2);
var day = ("0" + date.getDate()).slice(-2);
    
console.log(`${year}-${month}-${day}`); // 2011-05-09
 Run code snippetHide results
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #milliseconds #javascript
ADD COMMENT
Topic
Name
9+5 =