views:

56

answers:

1

How Can I Turn This DateTime value into something that Sql Server 2005 won't shout at me for.

2007-12-01T00:00:00+00:00

(All I care about is the date, NOT the time).

I get this error when I tried to pass this argument to my stored procedure as a DateTime variable (Both the C# object and the Sql Server object are DateTime variables and need to be) : "Conversion failed when converting datetime from character string."

+1  A: 

A good way to transform a date, that the sql server will accept is the following format: yyyymmdd, for example 20071201.

p2u