I'm coming from db2 and now need to cast a timestamp field to date in Oracle 19c.
Using cast(mytimestampfield as date) it is returning the time too. How to that without return the time?
Testing...it returns 2024-02-28 13:16:42
SELECT cast(SYSTIMESTAMP as date) FROM dual;
I'm looking for : 2024-02-28
In this case you can use truncate:
TRUNC(cast(SYSTIMESTAMP as date))
See the Oracle documentation for more information