Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Easy Date Format Words Text in RPG IV
has no ratings.
Published: 03 Aug 2015
Revised: 03 Aug 2015 - 781 days ago
Last viewed on: 22 Sep 2017 (1878 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.

Easy Date Format Words Text in RPG IV Published by: Bob Cozzi on 03 Aug 2015 view comments(2)

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

COMMENTS

(Sign in to Post a Comment)
Posted by: speel
Premium member *
Comment on: Easy Date Format Words Text in RPG IV
Posted: 2 years 1 months 19 days 18 hours 51 minutes ago

The SQL built in functions VARCHAR_FORMAT and TIMESTAMP_FORMAT are also worth becoming familiar with if you are on a current release.

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Easy Date Format Words Text in RPG IV
Posted: 2 years 1 months 19 days 17 hours 59 minutes ago

Yes the enhancements to VARCHAR's new VARCHAR_FORMAT ("new" on IBM i anyway) is pretty cool. It also supports editing numeric fields with commas, periods, dollar signs, etc. Pretty nice, although you do have to wrap your resulting values in a SUBSTR() or even CHAR(varchar_format( myNumericValue, '................') , 10) in order to have it not return a 255-byte (or whatever its default length is) result.