Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all visitors
i have problem with compare datetime in sql server 2005.
Is it possible that i use (<) from compare date in sql server 2005?
This is my code.
select* from sale where docdate>'2/2/2011'


Thanks
TONY
Posted

convert(varchar(10),docdate, 101) see here[^]
 
Share this answer
 
v2
Several conversion formats for DateTime are given here

http://www.sqlusa.com/bestpractices/datetimeconversion/[^]

it may be helpful to you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900