Oracle: converting timestamp to date

Here is the method to display timestamp in the convenient format:


SELECT TO_CHAR (SYSTIMESTAMP, 'YYYY-MM-DD HH24:MI:SS') s_date
FROM DUAL;

Simple conversion of the timestamp:

SELECT CAST(SYSTIMESTAMP AS DATE) x_date FROM DUAL;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.