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



Werner,
Thanks for posting my code. <tic>
As a follow up: This code was/is: (C) COPR. 1999 by Robert Cozzi, Jr.
I do this because while I don't mind it being posted here for non-commercial
use, I know that many of the writers for commercial (i.e., for-profit)
publishers monitor this and other lists for material. 
-Bob Cozzi

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Werner Noll
Sent: Monday, May 03, 2004 7:25 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: AW: Need to know Day of any Date

This is a snippet from a procedure, which uses the CEEDYWK API:

*-------------------------------------------------------------------------
* yDayOfWeek returns the day of the week (1=Sunday, . . 7=Saturday)       
*-------------------------------------------------------------------------
 yDayOfWeek      B                   Export                               
* Procedure interface                                                     
 yDayOfWeek      PI             1S 0                                      
  p$InDate                       D   Const DatFmt(*ISO)                   
*                                                                         
* BaseDate is the day the calendar changed                                
  BaseDate       S               D   Inz(D'1582-10-14') Static            
  nDayOfWeek     S             10I 0 Static                               
  nDays          S             10I 0                                      
  r$Day          S              1S 0                                      
*---------------------------------------------------------------*         
/free                                                                     
  Test(E) p$InDate;                                                       
  If %error;                                                              
     Return -1;                                                           
  EndIf;                                                                  
   nDays = %diff(p$InDate:BaseDate:*D); 
                                        
   CallP CEEDYWK(nDays:nDayOfweek);     
   r$Day = nDayOfWeek;                  
   Return r$Day;                        
                                        
 /end-free                              
P yDayOfWeek      E                     

Regards,
Werner Noll
-----Ursprüngliche Nachricht-----
Von: akhan@xxxxxxxxxxxxxxxxxx [mailto:akhan@xxxxxxxxxxxxxxxxxx]
Gesendet: Montag, 3. Mai 2004 10:21
An: rpg400-l@xxxxxxxxxxxx
Betreff: Need to know Day of any Date


HI,
 
I need to know Day of any transaction date. My transaction date 8,0 numeric
(yyyymmdd format), RPG *DAY code gives me current Job's Day in numeric value
but I need Day of any given date and like to know Day as SAT,SUN,MON etc.
Please help me how to get it in simple way.
 
 
Regard.
  
 
Amir Raza Khan
 
 
_______________________________________________
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 ...

Follow-Ups:
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.