Midrange News for the IBM i Community

Posted by: sarge
U.S. Army
United States
has no ratings.
Published: 31 Dec 2012
Revised: 23 Jan 2013 - 2185 days ago
Last viewed on: 15 Jan 2019 (3410 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.

dates Published by: sarge on 31 Dec 2012 view comments(5)

hi all,

i have a date field in a file, that is 6.0 ymd format. i added an *iso date field to that file and wrote a simple rpg program to populate the new field.

using SQL, i viewed the file. it showed the date field being 01/01/81. after several frustrating rewrites of a 3 line RPG program, i used UPDDTA to look at the records. all of the records are in the proper 1981-01-01 format.

any ideas as to why the data is populated correctly, but SQL shows the date in mm/dd/yy but UPDDTA shows it as ccyy-mm-dd as proper? based on this, how do i prove that the data in the file is correct or not?



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