Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hundred year format

Status
Not open for further replies.

Jaytib

Programmer
Joined
Sep 7, 2010
Messages
19
Location
US
Does anyone know how to convert a date to the hundred year date format.
For example, how would i convert 8/11/2004 (B3ForD) to its hundred year date (wA3EndD)
format? I appreciate any suggestions. Thanks in advance.[flowerface]
 
I found here
this code:
Code:
D NumberDays      S              6  0                   
D StartDate       S               D   DatFmt(*ISO)      
D EndDate         S               D   DatFmt(*ISO)      
                                                        
 /free                                                  
   StartDate = %DATE('1900-01-01');                     
   EndDate = %DATE();                                   
   NumberDays = %DIFF(EndDate:StartDate:*DAYS);         
   DSPLY NumberDays;                                    
   RETURN;                                              
 /end-free
 
Thank You, I didn't see that:( Thanks for all your help as always, and have a great day!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top