I hope some of you will be able to help me regarding this datetime problem. The query in the stored procedure doesn't accept DD/MM/YYYY format, although all dates are being saved in the format of DD/MM/YYYY hh:mm:ss.
Example of query that throws the error:
@sDate = '31/8/2010'
@eDate = '1/9/2010'
SELECT * FROM tb_Schedule where scheduledate >= @sDate and scheduledate <= @eDate
Error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
FYI, the SQL Server 2005 is defaulted to British English(2057)for all logins and the DB server itself and my server Regional and Language is set to English (United Kingdom).
Any help will be appreciated.
Thank you very much.
View Complete Post