I am trying to do a select and set the time to 10AM in DB2. Ive tried
SELECT (trunc(sysdate) + 10/24) FROM sysibm.sysdummy1;
however this sets the time to 0:00:00, im trying to get it set to 10AM, is there a way to do this in DB2?
Advertisement
Answer
Please can you try this:
SELECT trunc(sysdate) + 10 hours FROM sysibm.sysdummy1;
Here is the DEMO
Also, in your question example you have one open bracket too many.
it should be: SELECT (trunc(sysdate) + 10/24) FROM sysibm.sysdummy1
Cheers!