Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Samlldatetime error

Author  Topic 

BuddyRam
Starting Member

17 Posts

Posted - 2007-04-13 : 00:21:10

Hello,
When i executed the following query its working fine but when i executed through my asp code it throuing the following error..

Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.
query:
Select * from tbl_eventslist where eventtype_id=11 and [date]>='4/13/2007'

thanks

Cheers
Ram

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-13 : 00:22:47
specify date in universal format

Select * from tbl_eventslist where eventtype_id=11 and [date]>='20070413'



KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-04-13 : 03:25:35
Note that you should always express date in ISO format YYYYMMDD to avoid conflit with local date settings

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -