× 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.



On 17/12/2007, Adam Glauser <adamglauser@xxxxxxxxxxxx> wrote:
Peter.Colpaert@xxxxxxxxx wrote:
> Just a thought: could date fields be used for dates before Christ
> (theoretically speaking of course, I'm fully aware that calendars have
> changed many times in the past)

rob@xxxxxxxxx wrote:
Who gives a shit? Take it to CPF0000 unless you have a valid business
reason for caring.

Just because you don't care doesn't mean no one does. Think museums,
universities ... I know there are at least a few people from educational
institutions that read this list. It's certainly a valid question.

Of course it's a valid question and I also fail to understand the
vitriolic response. And the answer is no. The representation in the
database of an ISO date field requires 10 characters. The first 4 are
the year and there is no provision for representing a negative year. A
date calculation in ILE RPG resulting in a date before 0001-01-01 will
generate an overflow or underflow exception.

If you want to calculate the duration between two historical dates you
should also be aware that date calculations in RPG do not take the
adoption of the Gregorian calendar into account. October 4th 1582 was
a Thursday in the Julian calendar. Ten days were skipped so that the
following day was declared to be Friday October 15th. In ILE RPG the
%diff between 1582-10-15 and 1582-10-04 is incorrectly (from a
historical perspective) calculated as 11 days instead of 1 day.


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.