Collections:
Convert Dates to Character Strings in Oracle
How To Convert Dates to Characters 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, 'DD-MON-YYYY') FROM DUAL; -- SYSDATE returns the current date 07-MAY-2006 SELECT TO_CHAR(SYSDATE, 'YYYY/MM/DD') FROM DUAL; 2006/05/07 SELECT TO_CHAR(SYSDATE, 'MONTH DD, YYYY') FROM DUAL; MAY 07, 2006 SELECT TO_CHAR(SYSDATE, 'fmMONTH DD, YYYY') FROM DUAL; May 7, 2006 SELECT TO_CHAR(SYSDATE, 'fmDAY, MONTH DD, YYYY') FROM DUAL; SUNDAY, MAY 7, 2006
⇒ Convert Character Strings to Dates in Oracle
⇐ Convert Character Strings to Numbers in Oracle
2020-03-25, 2715🔥, 0💬
Popular Posts:
How To Get the Definition of a User Defined Function Back in SQL Server Transact-SQL? If you want ge...
How to execute statements under given conditions in SQL Server Transact-SQL? How to use IF ... ELSE ...
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? H...
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...