Heres one to change a 6,0 numeric date in MMDDYY form to 7,0 numeric date in CYYMMDD form.
Eval INTERNAL_DATE = %dec(%char(%date(EXTERNAL_DATE:*mdy) :*cymd0):7:0)
INTERAL_DATE is the 7,0 CYYMMDD date.
EXTERNAL_DATE is the 6,0 MMDDYY date.
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.
Encrypt IBM i File (Table) Data with no RPGLE changes using SQL
IBM i SQL statement to convert or compare hundred year date format
How to compare ‘100 Year Date’ to a Timestamp – aka – Weird AS400 iSeries Date formats
Use RPG to find the day of the week
Add days to 100 Year date from EXCEL using RPG
Convert RPG Datefield %DATE into a signed numeric
another as400 jba date conversion routine
What is AS400 modernization?
IBM i ACS 5250 EMULATOR FONT – and other ridiculous mumbo jumbo