Converts a JavaScript Date object to an ISO 8601 date-time string.
The format is CCYY-MM-DDThh:mm:ss.sssZ where T is a literal and Z indicates UTC. This matches the xsd:dateTime format required by OOXML.
Reference: ST_DateTime in OOXML specification
The Date object to convert
An ISO 8601 formatted date-time string
const now = new Date();const timestamp = dateTimeValue(now); // Returns "2024-01-15T10:30:00.000Z" Copy
const now = new Date();const timestamp = dateTimeValue(now); // Returns "2024-01-15T10:30:00.000Z"
Converts a JavaScript Date object to an ISO 8601 date-time string.
The format is CCYY-MM-DDThh:mm:ss.sssZ where T is a literal and Z indicates UTC. This matches the xsd:dateTime format required by OOXML.
Reference: ST_DateTime in OOXML specification