Home > DeveloperSection > Interviews > How to create a Date object in JavaScript?

Posted on    April-23-2011 1:36 AM

 JavaScript JavaScript 
Ratings:
 2 Answer(s)
  1440  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    April-23-2011 12:00 AM

We create  a data object in javascript as: 

dateObjectName = new Date([parameters])


Amit Singh

Total Post:565

Points:2825
Posted on    April-23-2011 12:00 AM

Create a direct instance of an object forexample:

dateObjectName = new Date([parameters])

The syntax for accessing a property of an object is:

dateObjectName.propertyname


Don't want to miss updates? Please click the below button!

Follow MindStick