Here's one for you guys.
I had this sp.....
which worked fine until I set the default language settings on my server from English US to English UK.Code:CREATE PROCEDURE spVisitors AS select convert(varchar,(getdate()-(day(getdate())-1)),101) as startdate, convert(varchar,getdate(),101) as enddate, sum([count]) as visits, sum(qcount) as requests, pid from tblcounterv3 where (convert(varchar,cast(countdate as datetime),101) between convert(varchar,(getdate()-(day(getdate())-1)),101) and convert(varchar,getdate(),101)) group by pid GO
Now I get this error :
Server: Msg 8115, Level 16, State 2, Procedure spVisitors, Line 3
Arithmetic overflow error converting expression to data type datetime.
Any ideas?
![]()




Reply With Quote