|
----- Original Message ----- From: "Stone, Brad V (TC)" <bvstone@taylorcorp.com> To: <RPG400-L@midrange.com> Sent: 24. august 2000 17:03 Subject: RE: Calculating Working(business) days > I originally wrote these for e-RPG since dates have to be in a funky format > for headers, cookies, etc. (like Mon, 10 Dec 2000) They ended up working > for this as well. Hi Brad, The CEEDAYS and CEEDATE functions offers a very easy way to build datestrings of the above kind, you just specify a 'picture' to return: **-- Control specification: --------------------------------------------** H DatEdit( *YMD ) **-- Date functions: ---------------------------------------------------** D CeeDays Pr ExtProc( 'CEEDAYS' ) OpDesc D CdDatChr 32a Const Options( *VarSize ) D CdDatPic 32a Const Options( *VarSize ) D CdLilDat 10i 0 D CdFc 12a Options( *Omit ) ** D CeeDate Pr ExtProc( 'CEEDATE' ) OpDesc D CdLilDat 10i 0 Const D CdDatPic 32a Const Options( *VarSize ) D CdDatChr 32a Const Options( *VarSize ) D CdFc 12a Options( *Omit ) **-- Global variables: -------------------------------------------------** D WxDatLil s 10i 0 D WxDatStr s 32a D JobDate s 8a ** **-- Mainline: ---------------------------------------------------------** ** C Move *Date JobDate ** C CallP CeeDays( JobDate C : 'YYYYMMDD' C : WxDatLil C : *Omit C ) C CallP CeeDate( WxDatLil C : 'Www, DD Mmm YYYY' C : WxDatStr C : *Omit C ) ** ** C Return ** The specific picture-rules are documented here: http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AMM03/4.6.4 Best regards, Carsten Flensburg +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.