# Database Discussions > Oracle >  Oracle equivalent statement to SQL Server

## richarsk

Can anyone help in figuring out how you would you convert this T-SQL statement to an Oracle PL/SQL statememt:

(This gives you all anniversary dates that are between 5/15 and 6/15 of any year.)


select * FROM this_table where
       ( datepart(month,anniversary_date) = 5 and 
	(datepart(day,anniversary_date) >= 15 and datepart(day,anniversary_date) <=31))
       OR
       ( datepart(month,anniversary_date) = 6 and 
	(datepart(day,anniversary_date) >= 1 and datepart(day,anniversary_date) <=15))
order by anniversary_date

----------


## db_fowler

--This gives you all anniversary dates that are between 5/15 and 6/15 of any year
-- Date_column must be an oracle DATE datatype

SELECT * FROM your_table
WHERE to_char(date_column,'mm/dd') BETWEEN '05/15' AND '06/15'

Date functionality is easy in oracle compared to t-sql.

check the sql reference manual for all related date functions

hth

----------

