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



LOL! Well, it does make perfect sense. the *dates* are different. They just
happen to represent the
same instant in time. Think of it in terms of things like length of service,
or in terms of a treaty
or in anything that has a legal sense of when something should happen or
take effect.

For example, in the U.S. you are legally an adult at 00:00 on the day of the
18th ann. of the date of your birth.
But you are minor at 24:00 of the day before.

The universe doesn't care about such trivialities; it *is* the exact save
instant in time. However,
the legal beagles make an issue of it. ;)

-Paul


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Peter.Colpaert@xxxxxxxxx
Sent: Wednesday, November 28, 2007 8:10 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: 00:00:00 or 24:00:00

I went one step further:

d timestamp1 s z
inz(z'2000-01-01-24.00.00.000000')
d timestamp2 s z inz(z
'2000-01-02-00.00.00.000000')
d equal s n inz
d difference s 10i 0 inz

/copy qrpglecpy,prattribs
/copy qrpglecpy,prqc2le
/free

equal = (timestamp1 = timestamp2);
dsply equal;
difference = %diff(timestamp1:timestamp2:*ms);
dsply difference;

*inlr = *on;
Return;

Result:

DSPLY 0
DSPLY 0

Which means that they're not the same, but there's not a millisecond
difference between them.

This goes over my head now...

Peter Colpaert
Application Developer
PLI - IT - Kontich, Belgium
-----
Yoda of Borg are we. Futile is resistance, assimilated will you be.
-----



Mark Walter <MWalter@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
28/11/2007 14:54
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: 00:00:00 or 24:00:00






Tested with this quick program
0001.00 Dtime1 S Z
inz(z'2000-01-01-00.00.00.000000')
0002.00 Dtime2 S Z
inz(z'2000-01-01-24.00.00.000000')
0003.00 Dequal S N
0004.00 /free
0005.00 equal = (time1 = time2);
0006.00 dsply equal;
0007.00 *inlr = *on;
0008.00 /end-free


result was

DSPLY 0

Not equal in the eyes of IBM.




Mark Walter

--
This is the RPG programming on the AS400 / iSeries (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 ...

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.