Posted By

wnasich on 11/12/11


Tagged

sql date iSeries AS400


Versions (?)

Convert integer to date using SQL in iSeries DB2


 / Published in: SQL
 

intfield has this format: YYYYMMDD

  1. SELECT
  2. date(substr(char(intfield), 1, 4) || '-'|| substr(char(intfield),5, 2) || '-'|| substr(char(intfield), 7, 2)) AS datefield
  3. FROM file1

Report this snippet  

You need to login to post a comment.