This content is no longer maintained. Please visit our new website.

ACCC Home Page Academic Computing and Communications Center  
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 
The A3C Connection, July/August/September 1998 The A3C Connection
July/Aug/Sept 1998 Contents What's New at the ACCC ACCC Free Public Labs The Case of the 100-Year-Old Babies The Year 2000, UIC, and You Microcomputer Software and Hardware
What Does Y2K Compliant Mean? The ACCC Y2K Plan The Right Format for Dates ACCC Free Seminars, Fall '98 About the A3C Connection  

The Right Format for Dates

 
The ACCC Beat Everyone 

The right format for dates in data -- and in the real world -- is one that is totally unambiguous.
When you see a written date, is it clear what date it really is? For example, in the United States, June 23, 1998 is often written as 06/23/98. In Europe, it's 23.06.98 or perhaps 98/06/23. We humans can tell that 06/23/98 and 98/06/23 are the same -- 23 has to be a day of the month because there are only 12 months. (But humans in the US might not recognize 23.06.98 as a date at all.)

Other dates do not fare as well -- the 12th or earlier day of any month, for instance, or any date after January 2, 2001 -- 01/02/01. Or is that February 1, 1001? (We're good for "which one is the year?" in the year 2000, because 00 has to be a year. And January 1, 2001 is totally OK; it's 01/01/01 in all three forms.)

Writing a four-digit year will at least tell you which of the three numbers is the year. But we're still left the other problem, which is more important globally: Is 02/01/2001 February 1, 2001 or January 2, 2001? What to do?

All the way back in 1988, the International Organization for Standardization decided, for obvious reasons, that these country-specific all-numeric date formats had to go. The ISO standard date format is defined in ISO 8601:  yyyy-mm-dd

This form has a number of good features. It has a four-digit year, it is unambiguous, and it can easily be sorted by a computer. And since nobody was using it before, it avoids favoring the traditions of any one country over another.

In written text, the traditional written forms of a date are also unambiguous, because a four-digit year is used and the month name is written as a word rather then a number. In English, we have the American form, June 23, 1998, and the British form, 23 June 1998. Regardless of the order, you can tell that the four-digit item is the year, the word is the month, and the two-digit item is the day. However, these literate forms should be avoided in any data processing use, because data is generally language-free and because dates in these formats cannot be sorted without conversion.
ISO 8601 defines acceptable formats for times as well; itís available at http://www.mcs.vuw.ac.nz/technical/SGML/doc/iso8601/ISO8601.html

This and other ISO 860-related links are in the ACCC document The Right Format For Dates, along discussions on how dates are stored internally in SAS, SPSS, and several programming languages, and instructions on writing dates in the ISO 8601 format with each package/language.

 
The A3C Connection, July/Aug/Sept 1998 Previous:  The ACCC Y2K Plan Next:  ACCC Free Seminars, Fall '98


1999-9-8  connect@uic.edu
UIC Home Page Search UIC Pages Contact UIC