Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Filter On DateTime Field with notime
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
How to Filter On DateTime Field with notime
Miscellaneous
Thread ID:
00742929
Message ID:
00742929
Views:
52
I have two fields EnterRecovery DateTime and ExitRecovery DateTime. I need to filter a query where these fields have 00:00:00 for the time portion. They will always have the date portion. Some of my records have times in them, others don't.

Can I just use some like
declare @ttRecoveryBetween datetime
set @ttRecoveryFrom = '10/01/2002 00:00:00'

select * from meetings 
where EnterRecovery between @ttRecoveryBetween and @ttRecoveryBetween
Thanks
Kirk
Next
Reply
Map
View

Click here to load this message in the networking platform