Ep

Ep

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>


Get Current Datetime in JavaScript Reviewed by Ravi Kumar on 3:56:00 PM Rating: 5

No comments:

All Rights Reserved by Etechpulse © 2012 - 2017
Powered By Blogger

Contact Form

Name

Email *

Message *

Powered by Blogger.