How do I Query DATETIME in WHERE Clause?

Posted by Admin on 19-Feb-2010 04:58

Hi,

I looking for good solution - please help me!

In my table there are two columns: date, time

In "where" I want to examine full datetime date+time.

Please give me good advice how to do it.
Thank you
Piotr

example for MS SQL2008
select 1,'2000-01-02','11:00'
select id,max(convert(varchar(20), tdate +' '+ ttime )) date
from #temp

Thank you

Piotr

http://www.informacjakrd.pl

All Replies

This thread is closed