XMPDateTime_Parse

Parse an XMP date.
XMPDateTime_Parse(dateTime;datePart;timePart;subSecs;tzOffset) ➔ validParts
dateTime Text The XMP datetime string.
datePart Date The date part.
timePart Time The time part.
subSecs Real The sub seconds part.
tzOffset Time The timezone offset.
↩︎ validParts Longint The parsed datetime parts.

Parse XMP date dateTime.

Parameter dateTime is the XMP date. XMP dates are in the ISO 8601 format:

  • YYYY
  • YYYY-MM
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mmTZD
  • YYYY-MM-DDThh:mm:ssTZD
  • YYYY-MM-DDThh:mm:ss.sTZD

Where:

  • YYYY = four-digit year
  • MM = two-digit month (01 = January)
  • DD = two-digit day of month (01 through 31)
  • hh = two digits of hour (00 through 23)
  • mm = two digits of minute (00 through 59)
  • ss = two digits of second (00 through 59)
  • s = one or more digits representing a decimal fraction of a second
  • TZD = time zone designator (Z or +hh:mm or -hh:mm)

The time zone designator may not be present, in which case, the time zone is unknown, and the application should not assume anything about the missing time zone.

Parameters datePart, timePart, subSecs, and tzOffset receive the date, time, sub-seconds, and timezone parts of dateTime respectively.

The method result (validParts) a bitwise combination of the following constants denoting which parts were successfully parsed.

Constant Value Description
kXMPDatePart 0x0001 The date part of XMP datetime.
kXMPTimePart 0x0002 The time part of XMP datetime.
kXMPTimezonePart 0x0004 The timezone part of XMP datetime.