The Date object in JavaScript.

var myObjectVariable = new Date(DateInfo)

Here are the various possibilities for DateInfo:

Properties

.constructor. Specifies the function that created an object's prototype. See Object.constructor.

.prototype. Represents the prototype for this class. You can use the prototype to add properties or methods to all instances of a class.

Methods

.getX(). These methods get/retrieve some portion of its date object. The variations include: Date, Day, FullYear, Hours, Milliseconds, Minutes, Month, Seconds, Time, TimezoneOffset, UTCDate, UTCDay, UTCFullYear, UTCHours, UTCMilliseconds, UTCMinutes, UTCMonth, UTCSeconds, and Year. Note that .getTime() returns milliseconds since midnight 01 January, 1970 UTC for the given Date object.

Most JavaScript functions are 0 based. This has no weirdness for most things (EG: .getHours() returns 0-23) with the following exceptions (and their UTC counterparts):

  • .getDate() returns 1-31
  • .getDay() returns 0-6 where 0=Sunday.
  • .getMonth() returns 0-11 where 0=January.

.parse(DateString). Returns milliseconds since midnight 01 January, 1970 UTC for the given datetime string.

.now(). Returns milliseconds since midnight 01 January, 1970 UTC for the system date and time.

.setX(). These methods set/specify some portion of its date object. The variations include: Date, Day, FullYear, Hours, Milliseconds, Minutes, Month, Seconds, Time, TimezoneOffset, UTCDate, UTCDay, UTCFullYear, UTCHours, UTCMilliseconds, UTCMinutes, UTCMonth, UTCSeconds, and Year.

.toY(). These methods usually translate its date object to a real world string. The variations include: GMTString, LocaleString, Source, String, and UTCString.

.UTC(intYear, intMonth[, intDay[, intHour[, intMinutes[, intSeconds[, intMilliseconds]]]]]). Returns milliseconds since midnight 01 January, 1970 UTC.

.valueOf(). Returns milliseconds since midnight 01 January, 1970 UTC.

Try to use the FullYear variations instead of Year variations.

2007-08-08 17:58:30Z