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



If you look at the RPG reference, it says that *LOVAL for a time value returns
00:00:00 and *HIVAL returns 24:00:00..!!

That must have been a head-scratcher for the compiler writers!

"Twenty-four-hundred hours" reverberates in my mind from times long agone and
it sounds more "natural" than "zero-zero hours".

But then what is 12:30 AM and 12:30 PM?

Fun with numbers, kids!

--Alan



-----Original Message-----
On Behalf Of Buck

I am having a timestamp edit code problem with midnight as 00:00:00 but
I want 24:00:00

Booth, I don't think you can easily do this. There was a discussion a
while back about time data types and if I recall, the conclusion was
That's Just The Way It Is.

00.00.00 is the end of today and 24.00.00 is the beginning of tomorrow
but you still can't compare them, i.e.

d stamp s z

c/free
stamp = z'2007-05-16-00.00.00';
dsply (stamp + %seconds(1)); // 2007-05-16-00.00.01
dsply (stamp - %seconds(1)); // 2007-05-15-23.59.59

stamp = z'2007-05-16-24.00.00';
dsply stamp; // 2007-05-16-24.00.00
dsply (stamp + %seconds(1)); // 2007-05-17-00.00.01
dsply (stamp - %seconds(1)); // 2007-05-16-23.59.59

if stamp = z'2007-05-17-00.00.00';
dsply 'unexpectedly equal';
endif;

*inlr = *on;
/end-free

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.