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.