I have an mssql database and also i have an contact form in my asp page. I try to use DateTime.Now for saving date to mssql. But i always get an error then conversation fail when converting string to date("Karakter dizesinden tarihe ve/veya saate dönüştürülürken işlem başarısız oldu."). When i use input type date, it is working but in the codebehind it is not working.The date format in asp.net is like this "10-Aug-20", and in mssql also same. How can i solve this?
string tarih = DateTime.Now.ToShortDateString();
string insert = "insert into table (date) values(tarih)";
In mssql;
[dateMsg] DATE NOT NULL,
In some places they suggest to change database language. But i can't change, because server is too big and the datas are getting effected. Is there a way for converting.