[2005] Sql Express Problem.
Well i have a little problem with the query that im making.
The problem is that i use a PT OS but some of my clients use an English OS. when i make the query in my computer it goes ok but in some of my clientes that are using the OS in English it does not work.
vb.net Code:
where cast(CONVERT(smalldatetime, o.data,101)as smalldatetime) BETWEEN cast('1/1/1999' as smalldatetime) AND cast('1/1/2009' as smalldatetime)"
This code works but if i use it in a OS English it says That cannot convert char to small date.
Is there other way to make a select between dates and finish with this errors? =)
Glad if you could help
Re: [2005] Sql Express Problem.
Thread moved to Database Development forum - which is where questions purely about SQL statements belong
You seem to have an extra Cast that isn't needed (around the Convert), and that could be causing the error. Try removing it, eg:
Code:
where CONVERT(smalldatetime, o.data,101) BETWEEN ...