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
 General SQL Server Forums
 New to SQL Server Programming
 pb executing an SP

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-09-25 : 09:45:09
I have an SP that has this part of code located in the line:30
select convert(datetime,CONFIGURATION1) from dbdw..configuration
where CLECONFIG = 'DATE-AJOUT-VENTES'

I get teh error:
Server: Msg 242, Level 16, State 3, Line 1
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Do u know what the problem is pls

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-25 : 09:50:31
what is the format of the datetime???


Chirag
Go to Top of Page

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-09-25 : 09:58:19
u re right i have a format of CONFIGURATION1 of 25/09/2006
Thanks a lot
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-09-25 : 10:12:36
quote:
Originally posted by rtutus

u re right i have a format of CONFIGURATION1 of 25/09/2006
Thanks a lot



use convert(datetime, CONFIGURATION1, 103)


KH

Go to Top of Page
   

- Advertisement -