code snippet to change MMDDYY to CYYMMDD in one line of RPGLE

No replies
Finkpad
Finkpad's picture
Joined: Oct 15 2008
User offline. Last seen 4 days 7 hours ago.

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.

Visitor Locations

Locations of visitors to this page

Recent comments

Who's online

There are currently 0 users and 20 guests online.

's beers

Beers are visible to logged in users only