using TRUNC in timestamps
404511Feb 21 2005 — edited Feb 22 2005Sir,
As you know we were using TRUNC function in DATE datatype. But I want to use it with TIMESTAMP datatypes. For example:
*************************************************************
select trunc(systimestamp,'hh24:mi:ss') from dual;
*************************************************************
The main idea to get some part of given timestamp without using type conversions (i.e. TO_CHAR).
Note that this is useful when you want to ADD or Subtract the time side from timestamp with interval values and comparing them to another timestamps fields or values.
Thank you in advance.