How To Insert Date Object In MySQL Using C#.NET
Hello,
To insert date object using C#.net in MySQL db,use the code below:
The key to the solution is using the MySQL Date format function.
To insert date object using C#.net in MySQL db,use the code below:
string query = String.Format("Insert into tbllistings(DateRegistered)" + "values(DATE_FORMAT({0}, '%Y-%m-%d %h:%m:%s'))",objJobs.DateRegistered);
The key to the solution is using the MySQL Date format function.
Comments
Post a Comment