×
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.
This is something that has to be done. I cannot start to learn SQL now. Much as I would like to.
I set up a file that has week endings for the next year, with a field to indicate which week of the month it is.
THis week of the month will be used to add the amount due on the weekly bucket.
My question is will the field on the PF that is the weekend date the Friday of each week compare to
mydate adddur duedays:*days datedue
the datedue. Meaning I will read this file until I find the location. I cannot do SQL now as I don;t know how to incorporate it into the RPG. Is there no way to do this as I have started in RPG?
________________________________
From: David Wright <opendave@xxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, November 12, 2008 2:27:19 PM
Subject: Re: date processing for end of week
Try this:
select
Current Date as Today,
Current Date + 45 days as TodayPlus45,
Current Date + 45 days +
case when dayofweek(Current Date + 45 days) < 6 then
6-DayOfWeek(Current Date + 45 days) else 6 end days
as TheNextFriday
from
sysibm/sysdummy1
On Wed, Nov 12, 2008 at 11:02 AM, Adam West <adamster@xxxxxxxxx> wrote:
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.
As an Amazon Associate we earn from qualifying purchases.