Bhavesh Vankar

Bhavesh Vankar

  • 684
  • 1.1k
  • 78.4k

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)