Bhavesh Vankar

Bhavesh Vankar

  • 764
  • 1.1k
  • 88.1k

getting error while storing date into database in vs2013

Apr 12 2020 11:33 PM
string Storedata = "Insert Into STUDENT_DETAILS (UNIQUEID, GRNO, FULLNAME, DOB, DOBINWORDS, STD, DIV, BIRTHPLACE, CASTRELIGION, MONO, STUDENTADDRESS, GENDER, MEDIUM, STUDENTPIC) Values ('"+STUDENT_ID.Text+"','"+GRNO.Text+"','"+fullname.Text+"','"+dateofbirth.Text+"','"+DOBINWORDSTXT.Text+"','"+std.Text+"','"+division.Text+"','"+birthplace.Text+"','"+castreligion.Text+"','"+mono.Text+"','"+studentaddress.Text+"','"+Gender+"','"+Medium+"',@IMG)";
 
i am getting error while save record.
error is :- conversion failed when converting date and/or time from character string 

Answers (13)