Date/Time Formats
Stay organized with collections
Save and categorize content based on your preferences.
Use the following date/time formats in the Hotel Ads XML messages and feeds.
Date
Dates are expressed in the following format:
YYYY-MM-DD
YYYY
: Four-digit year
MM
: Two-digit month
DD
: Two-digit day
Example: 2017-12-31
for December 31st, 2017.
YearlessDate
Yearless dates express a date event that occurs every year, and are expressed in
the following format:
MM-DD
MM
: Two-digit month
DD
: Two-digit day
Example: 12-31
for December 31st.
DateTime
DateTime uses the RFC 3339 format:
YYYY-MM-DDTHH:mm[:ss.SSS]+|-HH:mm[Z]
YYYY
: Four-digit year
MM
: Two-digit month
DD
: Two-digit day
T
: Separates the date from the time
HH
: Hours
mm
: Minutes
ss
: (Optional) Seconds
SSS
: (Optional) Milliseconds
+|-
: Separates the date and time from the timezone offset
HH:mm
: Hours and minutes in the timezone offset
Z
: (Optional) Zero offset
Example: 2017-12-31T16:20:00-04:00
.
You can also specify Z
for the timezone offset, which indicates zero offset.
Time
Time is expressed in the format:
HH:MM[:SS]
HH
: Hours
MM
: Minutes
SS
: (Optional) Seconds
Example: 16:20:00
or 16:20
.
Times are interpreted in the local time zone of the associated property.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-14 UTC.
[null,null,["Last updated 2025-04-14 UTC."],[[["\u003cp\u003eHotel Ads XML messages and feeds use specific formats for Date, YearlessDate, DateTime, and Time.\u003c/p\u003e\n"],["\u003cp\u003eDates are expressed as YYYY-MM-DD (e.g., 2017-12-31), while YearlessDates omit the year, using MM-DD (e.g., 12-31).\u003c/p\u003e\n"],["\u003cp\u003eDateTime follows the RFC 3339 format, YYYY-MM-DDTHH:mm[:ss.SSS]+|-HH:mm[Z], including timezone offsets.\u003c/p\u003e\n"],["\u003cp\u003eTime is represented as HH:MM[:SS] (e.g., 16:20:00 or 16:20) and is interpreted in the property's local time zone.\u003c/p\u003e\n"]]],[],null,["# Date/Time Formats\n\nUse the following date/time formats in the Hotel Ads XML messages and feeds.\n\nDate\n----\n\nDates are expressed in the following format: \n\n YYYY-MM-DD\n\n- `YYYY`: Four-digit year\n- `MM`: Two-digit month\n- `DD`: Two-digit day\n\nExample: `2017-12-31` for December 31st, 2017.\n\nYearlessDate\n------------\n\nYearless dates express a date event that occurs every year, and are expressed in\nthe following format: \n\n MM-DD\n\n- `MM`: Two-digit month\n- `DD`: Two-digit day\n\nExample: `12-31` for December 31st.\n\nDateTime\n--------\n\nDateTime uses the [RFC 3339](//www.ietf.org/rfc/rfc3339.txt) format: \n\n YYYY-MM-DDTHH:mm[:ss.SSS]+\\|-HH:mm[Z]\n\n- `YYYY`: Four-digit year\n- `MM`: Two-digit month\n- `DD`: Two-digit day\n- *T*: Separates the date from the time\n- `HH`: Hours\n- `mm`: Minutes\n- `ss`: (Optional) Seconds\n- `SSS`: (Optional) Milliseconds\n- *+|-*: Separates the date and time from the timezone offset\n- `HH:mm`: Hours and minutes in the timezone offset\n- *Z*: (Optional) Zero offset\n\nExample: `2017-12-31T16:20:00-04:00`.\n\nYou can also specify `Z` for the timezone offset, which indicates zero offset.\n\nTime\n----\n\nTime is expressed in the format: \n\n HH:MM[:SS]\n\n- `HH`: Hours\n- `MM`: Minutes\n- `SS`: (Optional) Seconds\n\nExample: `16:20:00` or `16:20`.\n\nTimes are interpreted in the local time zone of the associated property."]]