http://qs321.pair.com?node_id=1196596


in reply to Code flow not going to while loop

Try explicitly converting the character string to a date with the to_date(...) function (I think that's the correct function in DB2, anyway).

Replies are listed 'Best First'.
Re^2: Code flow not going to while loop
by chacham (Prior) on Aug 03, 2017 at 03:23 UTC

    Try explicitly converting the character string to a date with the to_date(...)

    Good idea. TO_DATE() is a synonym for the TIMESTAMP_FORMAT. Being clearer, i would use the latter.

    Judging from the documentation, he could just go all the way with TIMESTAMP_FORMAT(?, 'YYYY-MM-DD HH24:MI:SS').