ASP Calendar control returns Date type but I need Datetime to insert into SQL Server 2005

Posted by rafael on Stack Overflow See other posts from Stack Overflow or by rafael
Published on 2010-03-31T14:54:03Z Indexed on 2010/03/31 15:23 UTC
Read the original article Hit count: 225

Filed under:


I am using a ASP Calendar control to insert a datetime value into a field to be part of an insert to a SQL Server 2005 db table.

I get the following error when i submit the form to server and try to insert into table:

[ArgumentException: The version of SQL Server in use does not support datatype 'date'.]

Seems like Calendar control returns a Date type value. How could i make the Calendar control return a Datetime value instead?

I know now that SQL Server 2005 does not support Date type fields.

© Stack Overflow or respective owner

Related posts about asp

Related posts about ASP.NET