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)
 datetime error

Author  Topic 

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2004-02-02 : 02:04:53
while executing the following statement:
select convert(datetime,'Nov 31, 2002 10:05pm')
got the following error:
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

the datetime set is mdy
is there any way to make this work though this is not according to the iso standarts.

regards,
harsh.

He is a fool for five minutes who asks , but who does not ask remains a fool for life!

The Enigma
Posting Yak Master

179 Posts

Posted - 2004-02-02 : 03:09:57
31st of November ... thats what is wrong with this code ... nobody can make it work except in mysql
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2004-02-02 : 05:19:26
Just in case anyone else doesn't realise it The Enigma was pointing oyut that november only has 30 days.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

The Enigma
Posting Yak Master

179 Posts

Posted - 2004-02-02 : 05:52:08
Thanks NR ... for pointing that out. I will try to be more clear in future posts
Go to Top of Page
   

- Advertisement -