Collections:
Convert Character Strings to Dates in Oracle
How To Convert Character Strings to Dates in Oracle?
✍: FYIcenter.com
You can convert dates to characters using the TO_DATE() function as shown in the following examples:
SELECT TO_DATE('07-MAY-2006', 'DD-MON-YYYY') FROM DUAL;
07-MAY-06
SELECT TO_DATE('2006/05/07 ', 'YYYY/MM/DD') FROM DUAL;
07-MAY-06
SELECT TO_DATE('MAY 07, 2006', 'MONTH DD, YYYY')
FROM DUAL;
07-MAY-06
SELECT TO_DATE('May 7, 2006', 'fmMONTH DD, YYYY') FROM DUAL;
07-MAY-06
SELECT TO_DATE('SUNDAY, MAY 7, 2006',
'fmDAY, MONTH DD, YYYY') FROM DUAL;
07-MAY-06
⇒ Convert Times to Character Strings in Oracle
⇐ Convert Dates to Character Strings in Oracle
2020-03-25, 3298🔥, 0💬
Popular Posts:
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two char...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
Where to find reference information and tutorials on MySQL database functions? I want to know how to...
How To Escape Special Characters in SQL statements in MySQL? There are a number of special character...
How To List All Login Names on the Server in SQL Server? If you want to see a list of all login name...