<html>

<head>

<script type="text/javascript">

 

    var dateTime = "";   

 

    /* -------------------------------------- FUCNTIONS TO GET DATE AND TIME IN JAVASCRIPT --------------------------------------------------*/

    function JS_DateTime()

    {

            var dateT = new Date();

        dateTime = dateT.getYear()

        + '/' + (dateT.getMonth()+1)

        + '/' + (dateT.getDate())

        + ' ' + (dateT.getHours())

        + ':' + (dateT.getMinutes())

        + ':' + (dateT.getSeconds());       

    }    

    /* -------------------------------------- FUCNTIONS TO GET DATE AND TIME IN JAVASCRIPT --------------------------------------------------*/

 

    JS_DateTime();   

</script>

</head>

<body>

 

<h1>Javascript Date Time</h1>

 

<script type="text/javascript">   

    document.write(dateTime);

</script>

 

</body>

</html>

 
SEO Building Block