ASP.NET - Operand type clash: text is incompatible with date

Asked By bhanupratap singh on 21-Jul-12 07:35 AM
I m using asp.net c#. In which there is erro:--
Operand type clash: text is incompatible with date
I have date column as date 
What is the solutions of it.
thanks



Peter Bromberg replied to bhanupratap singh on 21-Jul-12 09:43 AM
If you are inserting into a database DateTime column, you need to convert the text date string to a DateTime object first.

DateTime myDateTime = DateTime.Parse("yourdatestring");