Q:

Day of Month must be between 1 and last day of month

Trying to write a query where I can see the format of a date using the query below
select to_date((substr(Key ,8,15)),'yyyymmdd') from Myrules
where LENGTH(substr(Key ,8,15)) = 8;

the data looks like this in the Key field 
AA-FFL-20200706
AA-FFL-20200961
AZ-MDL-20200961
AZ-MGL-4

I'm getting the error saying "day of month must be between 1 and last day of month" Any idea what am I doing wrong above?

A:

There's no day 61 in any month I know.

AA-FFL-20200961
AZ-MDL-20200961

