Oracle TO_DATE Function Explained with Examples

preview_player
Показать описание

The Oracle TO_DATE function is one of the most useful conversion functions in Oracle. It can be a little confusing though.

The TO_DATE function is used to convert a character value to a date value.

You can use it to convert a string that is in the format of a date, into a date data type.
Рекомендации по теме
Комментарии
Автор

Thanks! Nice examples, and to the point. Minute 1:14 solved my issue.

thatguygio
Автор

how to display completed year using to_date method like 25-Jan-2022

TechComputer
Автор

You ask keep an hypen between dates and mon.. its gives / ... why?

datlogin
Автор

thanks that's helpful. Why sometimes we used TO_CHAR for converting a date and sometimes TO_DATE
when should I use both?

amralkhatib
Автор

What is frustrating is that if I try and do something like "sysdate" and put TO_DATE((SYSDATE), 'MM/DD/YYYY') I get "a non numeric character was found where a numeric was expected"

What is annoying is SELECT SYSDATE FROM DUAL works just fine.
I use TO_CHAR and it works HOWEVER, I lose all "Date" functionality where when I try and use conditional formatting it throws another error
I don't want to use TO_CHAR and lose my date functionality.

ltcmdc
Автор

Hi there,

How can I cast this function to a date? It returns the result 20220517 which is essentially a date I extracted using the below function:

substr(fle.van_lead_thirdpartysource, -8)

Many thanks,

JD

JD_
welcome to shbcf.ru