Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

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


Avatar of Aneesh
Aneesh
Flag of Canada image


select * from orders where dateordered  CONVERT(DATETIME, @Date1,103) AND CONVERT(DATETIME, @Date2,103)
ASKER CERTIFIED SOLUTION
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

thanks