Click here to Skip to main content
14,327,370 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

convert(varchar(10),docdate, 101) see here[^]
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 2

Several conversion formats for DateTime are given here

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

it may be helpful to you.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100