SoFunction
Updated on 2025-03-10

js code showing current system time


    var myDate = new Date(); 
();         //Get the current year (2 digits)
();    //Get the complete year (4 digits, 1970-????)
();       //Get the current month (0-11, 0 represents January)
();        //Get the current day (1-31)
();          //Get the current week X (0-6, 0 represents Sunday)
();         //Get the current time (the number of milliseconds starting from 1970.1.1)
();       //Get the current number of hours (0-23)
();     //Get the current number of minutes (0-59)
();     //Get the current number of seconds (0-59)
();    //Get the current number of milliseconds (0-999)
();     //Get the current date
var mytime=();     //Get the current time
( );         //Get date and time