To display the day of the week of any date in the last 1,000 years

1

I used this command

select to_char(to_date('18-apr-1972','dd-mon-yyyy'),'day') day from DUAL;

but gave execution error:

ORA-01841: ano (completo) deve estar entre -4713 e +9999 e não pode ser zero
01841. 00000 -  "(full) year must be between -4713 and +9999, and not be 0"
*Cause:    Illegal year entered
*Action:   Input year in the specified range

Could someone show me another way? I use Oracle.

    
asked by anonymous 28.12.2016 / 22:37

1 answer

1

How it works:

select to_char(to_date('18-04-1972','dd-MM-yyyy'),'day') day from DUAL;

    
29.12.2016 / 13:46