Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date Validations with VALIDATE_CONVERSION and the CAST functions in Oracle 12c

Arnab PFeb 7 2020 — edited Feb 7 2020

I have a question regarding the Oracle Live SQL Tutorial Link :- https://livesql.oracle.com/apex/livesql/file/tutorial_EDVE861IMHO1W3Q654ES9EQQW.html

The link shows how we can use the VALIDATE_CONVERSION and CAST functions to validate common data types in the data. The date validations are also shown.

The dates have been used in the format as 17-DEC-80. Is this format that is only recognized by these two functions. As if I change this format to 17/12/1980 the functions return that the dates are invalid.

We generally get dates in these formats (dd/mm/yyyy or mm/dd/yyyy or thereof) unless they are copied from Excel spreadsheets. Can we change the formats to be checked against in these functions by some means?

Thanks

Arnab

This post has been answered by AndrewSayer on Feb 7 2020
Jump to Answer
Comments
Post Details
Added on Feb 7 2020
3 comments
1,146 views