cancel
Showing results for 
Search instead for 
Did you mean: 

To detect an exception

Former Member
0 Kudos

Hi,

When running a report against Oracle DB, how to detect an invalid date format, for instance, that is NOT like 'DD-MM-YY'?

Accepted Solutions (0)

Answers (1)

Answers (1)

fritzfeltus
Product and Topic Expert
Product and Topic Expert
0 Kudos

Could you please explain your issue a bit more? Where is the date coming from, what do you want to do with it? Is it from a user through a parameter?

Former Member
0 Kudos

For instance, to see (or check) if the below parameter is a right date or not, using a command.

select to_date('{?p_date}','dd-mm-rr')

from dual

fritzfeltus
Product and Topic Expert
Product and Topic Expert
0 Kudos

When creating the command and adding the parameter, did you choose "Date" as parameter type? This would enforce users entering the date in the correct format.