Digin Dominic Digin Dominic - 4 months ago 12
SQL Question

How to select between two dates without using year to get birthday

select * from tbl_contact e where e.dob between to_date('26-APR-2000','DD-MON-YEAR') and to_date('03-MAY-2002','DD-MON-YEAR')


How to resolve this issue.

Answer

if the type of dob field of your table is date,the following query will help you:

select * from tbl_contact e where e.dob between
                                                 to_date('26-APR','DD-MON')   and to_date('03-MAY','DD-MON')

i hope to help you