locked
Looking for a query statement to convert 7 numeric field to date field. RRS feed

  • Question

  • Looking for a query statement to convert 7 numeric field to date field.The server is DB2.I tried the following query but got it in a string format need help in converting it into date.

    SELECT * FROM OPENQUERY(Rego,'
    SELECT  Concat(Concat(INT(LEFT(SDATE,3))+1900,Substring(SDATE,4,2)),Right(SDATE,2)),SDATE from PPLHISTMM.SHOPHST
    ')

    

    

    This is the field I need to convert to Date.Thanks in advance.

    Thursday, March 22, 2018 2:43 PM