Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get the current date and time in javascript

// Getting date and time with javascript 
// example: 1/11/2021 1:34:29

var currentdate = new Date();
var datetime = currentdate.getDay() + "/" + currentdate.getMonth() 
+ "/" + currentdate.getFullYear() + " " 
+ currentdate.getHours() + ":" 
+ currentdate.getMinutes() + ":" + currentdate.getSeconds();

Source by tecadmin.net #
 
PREVIOUS NEXT
Tagged: #current #date #time #javascript
ADD COMMENT
Topic
Name
8+2 =