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



that's what I am not understanding. I have a diff example
c     Sund          subdur    2:*Days       Frid               

But there I establish Sunday as my start date and then go back two days to get the Friday,

I am not understanding maybe someone can explain more slowly so to speak, what do I do,
I add 10 days from today, lets say that is a Wednesday, how to know this, and how to know how many days to make your Friday limit for that week




________________________________
From: Mark Walter <mwalter@xxxxxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, November 12, 2008 1:13:51 PM
Subject: RE: date processing for end of week

If you know what any Friday is, you know what any Friday is. Clear as Mud, right.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam West
Sent: Wednesday, November 12, 2008 1:02 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: date processing for end of week

My question is, how does the program know when the next Friday is?






________________________________
From: Booth Martin <booth@xxxxxxxxxxxx>
To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Sent: Wednesday, November 12, 2008 12:40:40 PM
Subject: Re: date processing for end of week

This code is pretty old, but the concept is pretty easy once the light bulb goes on.

http://www.martinvt.com/Code_Samples/Date_Math/date_math.html

Every week has 7 days, right?  So pick any Friday, since that is the day of the week you want.  Then find the number of days between that date and your target date.  Divide by 7 and /discard/ the result and  /save/ the remainder.  That remainder is your off-set from Friday, in days.
You need to tinker with it.  For example, what if the order date is Friday?  Does that go in this week or next week?  But you get the idea, right?

Adam West wrote:
HI I have a need to look at a file of back orders, and assume, for the sake of the report, that each back order will be shipped today and the customer will pay by the end of the terms date that they have, e.g. net 10 days, net 30 days etc.

This will then be printed as a report to the week ending day of Friday for that particular week in the future.

So if order A, is due in 20 days, it would be part of a bucket for that week. But you never know your starting point, it could be 10,20,25, 30,etc days into the future. How then can you know when Friday is in that particular week in an automated fashion?
TIA,


 

--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------

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


No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.2/1783 - Release Date: 11/12/2008 10:01 AM

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.