// dateOfBirth will simulate your text from Txt_dob.Text string dateOfBirth = DateTime.Now.ToString("dd/MM/yyyy"); DateTime dateTimeInstance = DateTime.ParseExact( dateOfBirth, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); // You now have a DateTime instance. // If you need this as a string in MySQL format string mySqlString = dateTimeInstance.ToString("yyyy/MM/dd");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)