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



When talking with humans, I think everyone will agree that 2400 and 0000 both refer to midnight.

But as a programmer, if I ever need to know which is which, it's time to ask the computer. On my v5r2 machine:

d time1 s t d time2 s t d timestamp1 s z d timestamp2 s z /free time1 = %time('24.00.00'); time2 = %time('00.00.00'); dsply time1; dsply time2; if time1 = time2; dsply 'are equal'; else; dsply 'are NOT equal'; endif; timestamp1 = %timestamp('2007-05-01-24.00.00.000000');
timestamp2 = %timestamp('2007-05-02-00.00.00.000000');
dsply timestamp1;
dsply timestamp2;
if timestamp1 = timestamp2;
dsply 'are equal'; else; dsply 'are NOT equal';
endif; *inlr = *on; /end-free

the results are:

DSPLY 24.00.00 DSPLY 00.00.00 DSPLY are NOT equal

DSPLY 2007-05-01-24.00.00.000000
DSPLY 2007-05-02-00.00.00.000000
DSPLY are NOT equal
Actually, I was sort of expecting the timestamps to be equal...

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /

They are different, yet the same as they are two different ways of referring
to the same thing, i.e. midnight. It makes sense for computers to work on
the 00:00:00.000000 to 23:59:59.999999 range as there are fewer rollover
checks to make when incrementing the low-ordinal values.

Jonathan



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.