|
Simon,
I think you hit the nail on the head. I would suspect that the reason why the US uses MMDDYYYY is because we say it as.. December 15th, 2009. So people here write their dates 12/15/2009 because that is how they say it in their heads. It then translated over into the computer world where these dates must now be stored.
Does the rest of the world say 15th December, 2009?
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Simon Coulter <shc@xxxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12/15/2009 02:31 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Date formats
On 15/12/2009, at 11:53 PM, Glenn Hopwood wrote:
If you use numeric fields for your dates I think mmddyy has a more
'natural' sort then ddmmyy.
Only true within a given year. As soon as your dates span multiple years any so-called sort using MMDDYY is messed up (unless you WANT to group the same months together). Of course, DDMMYY is effectively unsortable anyway so I suppose there's a weird logic that MMDDYY is somehow better than DDMMYY.
The only sensible numeric date formats for a database field is YYYYMMDD, CYYMMDD if you're strapped for space), or a day number from a given reference point (hopefully further back than 1900-01-01).
With the database using a Scaliger number to represent dates the visual format no longer matters as much although I think database date fields should be *ISO. Convert them for display or print purposes.
I never understood why MMDDYY became so popular in the US. That sequence of month number, day number, and year only makes sense when written in text form (e.g., November 11, 1918) or when spoken (e.g, August Fourteenth, Nineteen Forty Five). Even so, to many of us in the rest of the world that's still an odd format and the day of the month of the year (e.g., 2nd September, 1945) is more natural.
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.