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:
See the Oracle documentation for more information
https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/TRUNC-date.html#GUID-BC82227A-2698-4EC8-8C1A-ABECC64B0E79