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



Here is an old rpgle pgm I have
 
D Base_date       s               d   inz(d'1899-12-31')        
 * known Monday Date                                            
D ymd             s               d   datfmt(*YMD)              
D Work            s              7s 0                           
D work_fld        s              5s 0                           
D Dayofweek       s              1s 0                           
                                                                
C     *mdy          Move      udate         ymd                 
C     ymd           subdur    base_date     work_fld:*d         
C                   div       7             work_fld            
 * value in dayofweek 1 - 7 (1 being Monday)                    
C                   mvr                     DayofWeek           
C************       sub       1             DayofWeek           
C                   eval      *inlr = *on                       
****************** End of data *********************************
 
Hope this helps
 
Pete Olshavsky
Ind Mapics Programmer/Systems Analyst
 
 
 
 
 
 
 


WRamos@xxxxxxxxxxxx wrote:





Im looking to find a way to look up the day of the week using any given
date. Does anyone have a sample routine in an RPG program that can do
this?

Thanks

_______________________________________________
This is the MAPICS ERP System Discussion (MAPICS-L) mailing list
To post a message email: MAPICS-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mapics-l.


---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now

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.