Date and time format – ISO 8601
What is ISO 8601?
ISO 8601 describes an internationally accepted way to represent dates and times using numbers.
When dates are represented with numbers they can be interpreted in different ways. For example, 01/05/12 could mean January 5, 2012, or May 1, 2012. On an individual level this uncertainty can be very frustrating, in a business context it can be very expensive. Organizing meetings and deliveries, writing contracts and buying airplane tickets can be very difficult when the date is unclear.
ISO 8601 tackles this uncertainty by setting out an internationally agreed way to represent dates:
For example, September 27, 2012 is represented as 2012-09-27.
ISO 8601 uses the 24-hour clock system. The basic format is [hh][mm][ss] and the extended format is [hh]:[mm]:[ss].
- [hh] refers to a zero-padded hour between 00 and 24 (where 24 is only used to notate midnight at the end of a calendar day).
- [mm] refers to a zero-padded minute between 00 and 59.
- [ss] refers to a zero-padded second between 00 and 60 (where 60 is only used to notate an added leap second).
So a time might appear as either “134730” in the basic format or “13:47:30” in the extended format.
Or 1330 and 13:30 without the seconds.
ROJoson’s Recommendations (2013-07-03):
From now on, if you want to indicate dates with number, use the YYYY-MM-DD format.
For time, [hh][mm][ss] or [hh]:[mm]:[ss] or [hh][mm] or [hh]:[mm].