Web | This Site

JavaScript Basics
JavaScript Objects
JavaScript Advanced
JS Useful References
JS Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# Javascript Date - valueOf Method

## Description:

This method returns the primitive value of a Date object as a number data type, the number of milliseconds since midnight 01 January, 1970 UTC.

## Syntax:

    Date.valueOf()

Here is the detail of parameters:

- NA

## Return Value:

Returns the primitive value of a Date object.

## Example:

    <html>
    <head>
    <title>JavaScript valueOf Method</title>
    </head>
    <body>
    <script type="text/javascript">
       var dateobject = new Date(1993, 6, 28, 14, 39, 7);
       document.write( dateobject.valueOf() );
    </script>
    </body>
    </html>

This will produce following result on 29th Aug 2008 :

    743850547000

To understand it in better way you can Try it yourself.

Advertisement

Online Image Processing

Indian Baby Names