Tag Archives for " #date "

Jul 11

Convert RPG Datefield %DATE into a signed numeric

IBM i , Programming , RPG

To convert a RPG DATEFIELD to this numeric 8,0 field with no ‘/’ or ‘-‘ do this: D USADate 8s 0 USADate = %dec(%char(DateField:*iso0):8:0); Or another even neater function is this: USADate = %uns(%char(DateField:*USA0)); I prefer this %UNS built in function, since it does not require me to specify length and decimal position parameters. What […]

More Waffle
Mar 12

another as400 jba date conversion routine

AS400 , IBM i , iSeries , RPG

jba chertsey as400 system21 erp nick downes nee litten steve stephen rees claire mckeown brian stagg jodie stagg spoonface paul crtis toby schofield

Here’s the other date conversion – It’s a JBA date (7,0 numeric) to 8 character alpha in JIS format (YYYYMMDD) with no separators. If you want separators in your result then simply expand the result field by 2 characters (to 10) and replace the “0” in the “*jis0” with what ever separator you prefer. Eval […]

More Waffle