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






Kathy, if you are working on RPG IV you can subtrackt two dates like this:

   *First you must define two date fields:
D  WIso1          S               D   DATFMT(*ISO)
D  WIso2          S               D   DATFMT(*ISO)
.
.
.
  *Move your input fields to the date fields you have defined and then subtract
them.
C                            MOVE        ShipDate                      WIso1

C                            MOVE        ReqDelivDate            WIso2

C     WIso1          SUBDUR  WIso2                            Num_Days:*D
5 0
.
.
.
Num_Days is the number of days between ShipDate and ReqDelivDate.

Theo Panagiotoulias
Lion Hellas S.A.






"Kathy Wyatt" <piewhacket@advi.net> on 01/09/2000 03:21:56 &pgr;&mgr;

Please respond to RPG400-L@midrange.com

To:   RPG400-L@midrange.com
cc:    (bcc: Theodoros Panagiotoulias/LION)

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
+---





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.