in c#.net we are taking datetime from datetimepicker we are storing datetime into sqlserverdatabase.
in sqlserver we are taking datetime datatype.
we write code like this:
cmd=new sqlcommand("insert into values(date) tablename('"+dt+"')",con);
we are seleted date datetimepicker as 19/12/2006
after excuting this one we are getting error like this:
conversion of char data type to datetime data type resulted in an out of range datetime value
December 19, 2006 4:33 AM
December 19, 2006 10:54 AM