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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -