Collections:
Convert Times to Character Strings in Oracle
How To Convert Times to Character Strings in Oracle?
✍: FYIcenter.com
You can convert dates to characters using the TO_CHAR() function as shown in the following examples:
SELECT TO_CHAR(SYSDATE, 'HH:MI:SS') FROM DUAL; 04:49:49 SELECT TO_CHAR(SYSDATE, 'HH24:MI:SS.FF') FROM DUAL; -- Error: SYSDATE has no fractional seconds SELECT TO_CHAR(SYSTIMESTAMP, 'HH24:MI:SS.FF9') FROM DUAL; 16:52:57.847000000 SELECT TO_CHAR(SYSDATE, 'SSSSS') FROM DUAL; -- Seconds past midnight 69520
2019-12-02, 892👍, 0💬
Popular Posts:
What Causes Index Fragmentation in SQL Server? Index fragmentation is usually caused by deleting of ...
What Do You Need to Connect PHP to MySQL in MySQL? If you want to access MySQL database server in yo...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
How Can Windows Applications Connect to Oracle Servers in Oracle? A Windows application can connect ...
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? H...