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


  • Subject: Re: date function-clarify
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Wed, 13 Oct 1999 11:57:32 -0700
  • Organization: Conex Global Logistics Services, Inc.

*Scratches his head*

RPG/400 does dates, right?  Is your 1999/12/12 stored as a date or a
number?  In RPG/400 can't you add one to a date like you are trying to
do without all the shenanigans?

This number you are coming up with, 3457899, how are you getting this
from the date?  Is it # of days since 01/01/0001?

The date fields are doing the same thing you are doing behind the scenes.
The date field is actually stored as a number from a certain date (not sure
what date they use, 01/01/40 I *think*).  And when you add one it is a
simple matter of adding one to the number, like you are doing.

Is there a reason you aren't using the date fields?

But, to answer your question, you'll need to run your date to number routine
in reverse.  What formula/algorythm are you using?

Regards,

Jim Langston

keshava narasimha wrote:

> Hi !
>
> Let me be more clear on my question first...
>
> I have a date  1999/12/12 o.k..When I convert this date into days I you get
> a figure. (like 3457899)
>
> Now if  need to display tomorrows date ,  I add 1 to this number and   how
> do I display 1999/12/13 is the Question?(the function needs to be done using
> RPG/400 only not ILERPG)
>
> Thanks for all  your time.
>
> Keshav
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.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
> +---

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

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.