Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Comparing datetime values

Author  Topic 

Hakuzen
Starting Member

24 Posts

Posted - 2009-07-15 : 17:37:16
Hello, I have a pretty simple question..

Can you do less than or equal to comparisons in regards to datetime values within T-SQL

for example:

Where dateadd(d,0,cast(#Multiticket.DateCustomerConfirm as datetime)) >= dateadd(d,0,cast(#CompareTemp.DateFirstCallBack as datetime))


Where Both columns are datetime values. Ex: 01/06/09 and 01/08/09

Does this comparison return valid results or is sql server 2000 not capable of this logic?

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2009-07-15 : 18:14:32
The following code will work fine if they are datetime values:
where #Multiticket.DateCustomerConfirm >= #CompareTemp.DateFirstCallBack



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -