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



Joep,

If I run 12:00a through a test program, I get 24:00.

Here's the code:

d tijd s 10a inz('12:00a')
d c_p c 'P'
d c_pm c ' PM'
d c_am c ' AM'
d timupd s 6p 0 inz

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

Reset tijd;
If %subst(tijd:6:1) = c_p;
%subst(tijd:6) = c_pm;
Else;
%subst(tijd:6) = c_am;
EndIf;
timupd = atoi(%char(%time(tijd:*usa):*iso0));

*inlr = *on;
Return;

/end-free

When debugging, the field timupd is set to 240000.

So if I combine this with the date of 20000101, it seems to point to
midnight between 1 and 2 January 2000.

When initializing the tijd field to '12:01a', I get (as expected) a value
of 000100 in the timupd field.

Very strange to understand, though.

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



Joep Beckeringh <joep@xxxxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
28/11/2007 10:58
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






Hallo Peter,

According to the standard January 1, 2000 24:00:00 is the same as
January 2, 2000 00:00:00.

Your listing shows the time as '12:00a'. Would that not be midday,
instead of midnight (using AM/PM notation)?

Joep Beckeringh


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.