Easy Tutorial
❮ Prop Script Charset Met Video Canplaytype ❯

insdateTime Attribute

ins Object

Example

Return the date and time when the text was inserted:

x Output result:


Definition and Usage

The dateTime attribute is used to set or return the value of the datetime attribute of the inserted text.

The datetime attribute defines the date and time of the inserted or modified text.

Note: The dateTime attribute has no visual effect in regular web browsers but can be used by screen readers.


Browser Support

All major browsers support the dateTime attribute.


Syntax

Return the dateTime attribute:

Set the dateTime attribute:

Attribute Values

Value Description
YYYY-MM-DDThh:mm:ssTZD Date or time. The components are explained below: YYYY - Year (e.g., 2011)<br> MM - Month (e.g., 01 for January)<br> DD - Day (e.g., 08)<br> T - Required separator if time is specified<br> hh - Hour (e.g., 22 for 10:00pm)<br> mm - Minute (e.g., 55)<br> ss - Second (e.g., 03)<br> TZD - Time zone identifier (Z stands for Zulu, also known as Greenwich Mean Time)

Technical Description

| Return Value: | String, representing the date and time of the inserted text | | --- | --- |


More Examples

Example

Modify the datetime attribute value:

Related Articles

HTML Reference: HTML <ins> datetime Attribute


ins Object

❮ Prop Script Charset Met Video Canplaytype ❯