× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



In Paraguay, as in most of the civilized world, we use ddmmyyyy separarted either by /, -, or .
Is is not practical for sorting, but using "date" fields the order comes out Ok.

But, as any other rule, there are exceptions, and now I have a task for which I need to sort using mmddyyyy, to list aniversarys. For each month: the list of days, and for each day the list ordered by year.

Bryce Martin wrote:

Date sorting is most 'natural' when done yyyymmdd. That is why people always want to switch the order of the parts. This is actually quite mute in anything that is done with native date values, but most databases on the i are not set up this way. From what I've seem most date records are stored as numeric, and I'm guessing 8,0 numeric at that. If everything was stored as Date then there would be little use for all this switching around since I'm not aware of too many people who display dates as 2009/12/16, or 2009, Dec 16.

I wonder... if native date support had been in place since the beginning, would we have ever seen the 10000.01 trick? I'm only coming up on my 3rd anniversary on the platform, so this might be a naive point of view.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Alan Shore <AlanShore@xxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12/15/2009 08:01 AM
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
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>, rpg400-l-bounces@xxxxxxxxxxxx
Subject
Re: Date formats







Sorry Glen
completely disagree
which is "first"
12/15/09
or
12/01/10



Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill



Glenn Hopwood <ghopwood.list@gm ail.com> To
Sent by: RPG programming on the IBM i / rpg400-l-bounces@ System i <rpg400-l@xxxxxxxxxxxx> midrange.com cc

Subject
12/15/2009 07:55 Re: Date formats AM

Please respond to RPG programming on the IBM i / System i <rpg400-l@midrang e.com>





If you use numeric fields for your dates I think mmddyy has a more
'natural' sort then ddmmyy. Of course, being from the US, I'm biased. :)

Glenn

Carel Teijgeler wrote:

I think the illogical *USA date format is more a statistical solution to
compare months' profits over the years.

Or is there another reason for this format?

With regards,
Carel Teijgeler


*********** REPLY SEPARATOR ***********

On 14-12-2009 at 12:47 Jon Paris wrote:


"some countries"? How about "just about all". MDY is such an unusual

format that in IBM date terms the four digit year version is

designated as *USA!

When I was working on IBM's Y2K offerings the contractor that produced

the

tool did not originally include an MDY version as they had never

heard of it. As a result (and luckily for them) they had never

encountered the idiotic multiply by 10000.01 conversion method either.




--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.