I have this request
SELECT W.NUMBER,B.NAME,Br.NAME,W.WDATE,W.REPAIRSTATUS,W.REPAIRCOST,W.REMARK FROM Work_Order AS W,Brands AS B,Branches AS Br WHERE W.BRANDID = B.ID AND W.BRANCHID = Br.ID AND CAST(WDATE as DATETIME) < CAST('09/18/2012' AS DATETIME)
and the system will respond with
Converting a char data type to a datetime data type resulted in a datetime time value out of range.
also using this query, it gives the same error
SELECT W.NUMBER,B.NAME,Br.NAME,W.WDATE,W.REPAIRSTATUS,W.REPAIRCOST,W.REMARK FROM Work_Order AS W,Brands AS B,Branches AS Br WHERE W.BRANDID = B.ID AND W.BRANCHID = Br.ID ORDER BY CAST(W.WDATE AS DATETIME)
WDATE is similar to '09 / 03/2012 'and this is the input from jquery ui datepicker with date format mm / dd / yyyy
Please help me, I do not know how to fix this.
I am working on SQL Server 2005.
EDIT: I tried the same queries with another sql 2005 server and it works fine, please, please, how to fix this error using sql server settings