Monday, 18 August 2014

Using oracle DB to find on which day of the week you were born? :-)

To find out which day of the week a specific event was on, you can use the database, see example below:



SQL> alter session set nls_date_format='day dd-mon-yyyy';

Session altered.

SQL> select to_date('31-mar-1979','dd-mon-yyyy') from dual;

TO_DATE('31-MAR-1979'
---------------------

saturday  31-mar-1979

No comments:

Post a Comment