Jump to content

jdelamarre

New Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jdelamarre

  • Rank
    Newbie
  1. jdelamarre

    Date / Week issues with AS400 DB2

    you can create a function: /* ************************************************** */ SET PATH "QSYS","QSYS2","QGPL" ; CREATE FUNCTION QGPL.TO_DATE ( PARAM_DATE DECIMAL(8, 0) ) RETURNS DATE LANGUAGE SQL SPECIFIC QGPL.TO_DATE DETERMINISTIC CONTAINS SQL CALLED ON NULL INPUT RETURN DATE ( CASE WHEN PARAM_DATE IS NULL OR PARAM_DATE = 0 THEN '9999-01-01' ELSE DATE ( INSERT ( INSERT ( PARAM_DATE , 5 , 0 , '-' ) , 8 , 0 , '-' ) ) END ) ; /* ************************************************** */ and use WEEK() function
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.