DATETIME Attribute | dateTime Property

Internet Development Index

Sets or retrieves the date and time of a modification to the object.

Syntax

HTML<ELEMENT DATETIME = sDatetime... >
Scriptingobject.dateTime(v) [ = sDatetime ]

Possible Values

sDatetimeString that specifies or receives the date and time a modification.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

The following is the standard format for defining the time and date as defined in HTML 4.0 (and taken from the ISO reference 8601:1988).
Standard Date-Time Format
YYYY-MM-DDThh:mm:ssTZD

The following table shows the datetime syntax.
SyntaxDefinition
YYYY Four-digit year
MM Two-digit month (01=January, etc.)
DD Two-digit day of month (01 through 31)
hh Two digit hour (00 through 23) (A.M./P.M. NOT allowed)
mm Two digit minute (00 through 59)
ss Two digit second (00 through 59)
TZD Time zone designator

The following table shows values for the Time Zone Designator(TZD) above.
TZD syntaxDefinition
Z(Must be uppercase) Specifies coordinated universal time (UTC)
+hh:mm Specified time is hh hours and mm minutes ahead of UTC.
-hh:mm Specified time is is hh hours and mm minutes behind UTC.

If a generating application does not know the time to the second, it may use the value "00" for the seconds (and minutes and hours if necessary).

The standard specifies an uppercase "T" to indicate the beginning of the time element.

Note   This standard does not address the issue of leap seconds.

There is no functionality implemented for this property unless defined by the author.

Standards Information

This property is defined in HTML 4.0 Non-Microsoft link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

INS, DEL