rgb192
asked on
yyyy-mmm-dd to dd/mm/yyyy
orders.dateordered is datatime in the form yyyy-mm-dd
2010-01-01 18:04:14.000
2009-12-29 06:11:22.000
2010-01-02 05:55:21.000
$date1 is 31/01/2010 dd/mm/yyyy
select * from orders where dateordered is between $date1 and $date2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
select * from orders where dateordered CONVERT(DATETIME, @Date1,103) AND CONVERT(DATETIME, @Date2,103)