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, 3052🔥, 0💬
Popular Posts:
How Run SQL*Plus Commands That Are Stored in a Local File in Oracle? If you have a group of commands...
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPA...
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
What Are the Underflow and Overflow Behaviors on FLOAT Literals in SQL Server Transact-SQL? If you e...
How To View Data Files in the Current Database in Oracle? If you want to get a list of all tablespac...