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.  

ASKED: Feb 1, 2012  6:15 PM GMT
UPDATED: February 28, 2012  9:22:08 AM GMT
5 pts.

Answer Wiki:
Last Wiki Answer Submitted:  Feb 1, 2012  6:15 PM (GMT)  by  Bluesbox   5 pts.
To see other 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/

 36,420 pts.