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.
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/
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 1  Reply