Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change format date javascript

var now = new Date();
var dateString = moment(now).format('YYYY-MM-DD');

var dateStringWithTime = moment(now).format('YYYY-MM-DD HH:mm:ss');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #format #date #javascript
ADD COMMENT
Topic
Name
2+9 =