format date

  • Thread starter Thread starter Selen
  • Start date Start date
S

Selen

I use Calendar asp.net(c#).It gives me Calendar.SelectedDate.Date is string
I convert it to datetime with Convert.toDateTime but Sql server give me
error...
The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value. The statement has been terminated.

How can I solve the error and add date to sql server?

Thanks....
 
Hi Selen,
I use Calendar asp.net(c#).It gives me Calendar.SelectedDate.Date is string
I convert it to datetime with Convert.toDateTime but Sql server give me
error...
The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value. The statement has been terminated.

How can I solve the error and add date to sql server?

Could You give any sample of your insert/update expression.
Exception stack-trace and message would be very helpful here.

Regards

Marcin
 
Back
Top