Hello,
I am new to DB2 and wanted to truncate a time like '2008-08-10 15:04:08' so that I will get a result like '2008-08-10 00:00:00'. What I want to do is to get the beginning of each day.
I tried the following query but always get an error:
Please any idea on how to realize it.
Thanks,
Jony
I am new to DB2 and wanted to truncate a time like '2008-08-10 15:04:08' so that I will get a result like '2008-08-10 00:00:00'. What I want to do is to get the beginning of each day.
I tried the following query but always get an error:
Code:
SELECT TRUNC_TIMESTAMP(CURRENT TIMESTAMP - 24 HOURS,'DDD')
FROM SYSIBM.SYSDUMMY1;
Thanks,
Jony