Ü  %DATE { value { : date-format-code }

It is used to convert any character, numeric, or timestamp data to Date type.

 

Example –%date built-in function in rpgle

 


Columns . . . :    6  80                     
SEU==>
FMT D  DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data *********************************************
001.00 D string          S             10A
002.00 D date            S               D
003.00
004.00  /FREE
005.00        string = '020399';
006.00        date =  %date(string:*MDY0);
007.00        dsply date;
008.00  /END-FREE
009.00 C                   SETON                                        LR
****************** End of data ************************************************

 

 

OUTPUT

 

1999-02-03

 

 





User Comments:





Copyright © Go4as400.com, 2013-2017. Copyright notice