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
 SQL Server Development (2000)
 COMPARE DATES

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-16 : 09:32:13
SANJEEV GUPTA writes "I HAVE A FIELD OF DATTIME IN THE TABLE AND I WANT TO COPARE USING DATE LIKE '5/7/2001' BUT BECAUSE OF TIME ALSO IN THE FIELD I DIDN'T GET THE RIGHT ANSWER ANY HINT WILL BE APPRICIATED.
THANKS IN ADVANCE
SANJEEV GUPTA"

JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2002-07-16 : 09:42:57
Either use Datediff() to compare two dates by a specified increment or use convert(char(12), column1, 101) to eliminate the hour:min:sec portion of the date.

hth,
Justin

Go to Top of Page
   

- Advertisement -