5 pts.
 Iso to numeric date conversion in RPG /free
I came across Mitchel Laman's article entitled "RPG free-format date conversion cheat sheet" and felt like I'd struck gold.  Thank you Mitchel!  However, I cannot get this set of conversions to work: @numA = %dec(%char(@dateA:*ymd/):6:0);     @numB = %dec(%char(@dateA:*cymd/):7:0);   @numC = %dec(%char(@dateA:*iso-) :8 :0);   @numD = %dec(%char(@dateA:*mdy/):6:0);    @numE = %dec(%char(@dateA:*usa/):8:0); 

 

I get this error with all five of them: A character representation of a numeric value is in error (C G D F). What am I doing wrong? Thanks.  



Software/Hardware used:
ASKED: February 1, 2012  6:14 PM
UPDATED: February 28, 2012  9:22 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

odd .. life and the formats
Where you’ve got / you need 0 the formats like *mdy include the seperators
so today is 02/01//12 trying to convert this to a decimal will create an error ..
but most of the formats have an alter-ego, go Clark Kent, like this *mdy0 today in this format is 020112 which can be converted to a decimal.
Phil/

 44,060 pts.