<p>Wondering if there is a better why in  the WHERE clause of choosing records when you need to look at effective start and end dates?</p>

<p>Currently this how I've done it in the past on MS SQL Server. Just worried about the date and not the time. I'm using SQL Server 2005.</p>

<pre><code>AND Convert(datetime, Convert(char(10), ep.EffectiveStartDate, 101))
   &lt;= Convert(datetime, Convert(char(10), GetDate(), 101))
AND Convert(datetime, Convert(char(10), ep.EffectiveEndDate, 101))
   &gt;= Convert(datetime, Convert(char(10), GetDate(), 101))
</code></pre>

try
```
```
ep.EffectiveStartDate BETWEEN @date1 AND @date2
```
```
where you would do something like
```
```
declare @date1 datetime, @date2 datetime;  
set @date1 = cast('10/1/2000' as datetime)  
set @date2 = cast('10/1/2020' as datetime)
```
```