sql server - Efficient way to compare a datetime to midnight in SQL -


i want select sql server table datetime field > midnight of current date.

i'm using following ask if there more efficient way it?

 start_time > (select dateadd(d,0,datediff(d,0,getdate()))) 

if convert or cast current date date instead of datetime, believe can use in because date data type set midnight:

where start_time > convert(date, getdate()) 

or

where start_time > cast(getdate() date) 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -