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



also the date I have is this
 d datedue         s               d   inz(*job)                 

How can I compare this date with the one in my file, How should I define the field type in my file?

Please no more SQL answers. I have no time to do that way now.




________________________________
From: Bill Meecham <BMeecham@xxxxxxxxxxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, November 12, 2008 2:35:01 PM
Subject: RE: date processing for end of week

Adam,

1.  select current_date - 45 days from sysibm/sysdummy1
2.  select current_date + (6 - dayofweek(current_date)) days from sysibm/sysdummy1

and for more on the topic:
http://www.ibm.com/developerworks/db2/library/techarticle/0211yip/0211yip3.html

Need help getting the date into RPG?

bill
________________________________________
From: rpg400-l-bounces@xxxxxxxxxxxx [rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam West [adamster@xxxxxxxxx]
Sent: Wednesday, November 12, 2008 14:02
To: RPG programming on the AS400 / iSeries
Subject: Re: date processing for end of week

OK there are a couple of code help I need here.

1. I want to add say 45 days to the current date.
2. I then want to know, what is the next Friday for #1.

this will be going into 2009, as much as 180 days out.




________________________________
From: Adam Glauser <adamglauser@xxxxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Sent: Wednesday, November 12, 2008 1:38:34 PM
Subject: Re: date processing for end of week

Adam West wrote:
My question is, how does the program know when the next Friday is?

By figuring out what day of the week today is, then adding the
difference between today and Friday.

If you don't want to use SQL, you could implement one of the day of week
algorithms* for the Gregorian calendar.

HTH,
Adam

* http://en.wikipedia.org/wiki/Calculating_the_day_of_the_week
--
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.



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