Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATETIME 1

Status
Not open for further replies.

747576

Programmer
Jun 18, 2002
97
GB
Hi there,

I am getting the following error when casting the date '24/08/2007 10:40:00' in the sql below:

select cast('07/04/2009 14:57:00' as DATETIME)

ok

select cast('24/08/2007 10:40:00' as DATETIME)

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Is this to do with the sql server data format set. Can this be set in the server without using:

SET DATEFORMAT dmy

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top