|
This should work for you: (You may need to worry about the date's
formatting)
D Date1 s d
D Date2 s d
C* ______________________________________________________
C ShipDate IfNE *Zeros
C test(d) ShipDate 99
C *in99 IfEQ *Off
C MOVE ShipDate Date1
C End
C End
C ReQdelDate IfNE *Zeros
C test(d) ReqDelDate 99
C *in99 IfEQ *Off
C MOVE ReqDelDate Date2
C End
C End
C* (++--==)
C Date1 subdur Date2 days:*d 7 0 99
C 99 Mult -1 days
_______________________
Booth Martin
Booth@MartinVT.com
http://www.MartinVT.com
_______________________
"Kathy Wyatt" <piewhacket@advi.net>
Sent by: owner-rpg400-l@midrange.com
08/31/2000 08:21 PM
Please respond to RPG400-L
To: <RPG400-L@midrange.com>
cc:
Subject: Date caclulations
This is a newbie questions so please take it easy on me, everyone has to
start somewhere. I have no manuals available to me (offline), just text
books which yielded no suggestions.
I need to know if it is possible to subtract two dates (which will be
retrieved from an input file as numeric 8 digit fields (yyyymmdd)) and get
a
numeric answer. For instance, input fields with numeric values -
ShipDate = 20000808 and ReqDelivDate = 20000804, I would like to have 4 as
my result.
I think it can be done with julian dates somehow but I do not know how to
convert a numeric field to a julian date field.
Your assistance is greatly appreciated.
Kat W
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.