Latest

random

Get Current Datetime in JavaScript

Datetime JavaScript Format

In this blog post I will share a tip about date function in javascript. It's very easy to use javascript get datetime now in asp.net web application. Find the code snippet below :-

JavaScript Code
<script type="text/javascript">

        var dateT = new Date();

        dateTime = dateT.getYear()
Get Current Date Time in Java Script,pass with query string, java script, asp.net function, sample code, example
datetime in javascript example

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

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

        + ' ' + (dateT.getHours())

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

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

        alert(dateTime);
    </script>


No comments:

All Rights Reserved by Etechpulse © 2015 - 2016
Powered By Blogger

Contact Form

Name

Email *

Message *

Powered by Blogger.