Midrange News for the IBM i Community

Posted by: Deepak Deshpande
AS/400 Freelance Programmer/Analyst
Built-in function %dec example
has no ratings.
Published: 29 Jun 2012
Revised: 23 Jan 2013 - 1611 days ago
Last viewed on: 22 Jun 2017 (3725 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Built-in function %dec example Published by: Deepak Deshpande on 29 Jun 2012 view comments(6)


I am trying to get only MM/DD from system date and HH:MM from system time.

Can anyone point out where I am going wrong?


d                 DS

d xxDTTM                1      8  0
d  xxRVWDT              1      4  0
d  xxRVWTM              5      8  0

eval      xxRVWDT = %dec(%char(%date():*usa):4:0)

eval      xxRVWTM = %dec(%char(%time():*hms):4:0)




Return to midrangenews.com home page.
Sort Ascend | Descend