Latest

recent

JavaScript Date() Method

Definition and Usage

The Date() method returns today's date and time.

Syntax

Date()


Example

In this example we will print today's date and time:

<script type="text/javascript">
document.write(Date());
</script>

The output of the code above will be:

Sat May 12 2012 20:06:23 GMT+0530 (India Standard Time)
 
JavaScript Date() Method Reviewed by 1000sourcecodes on 19:27 Rating: 5
Powered by Blogger.