JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Javascript Date() Method
Description:
Javascript Date() method returns today's date and time and does not need any object to be called
Syntax:
Here is the detail of parameters:
Return Value:
Returns today's date and time
Example:
<html>
<head>
<title>JavaScript Date Method</title>
</head>
<body>
<script type="text/javascript">
var dt = Date();
document.write("Date and Time : " + dt );
</script>
</body>
</html>
|
This will produce following result:
Date and Time : Wed Aug 27 2008 20:12:50 GMT+0530
(India Standard Time)
|
To understand it in better way you can Try it yourself.
|
|
|