There seems to be a million questions here on converting a string to a Date, but not vice-versa. When I convert a Date object to a string using mydate.toString
mydate.toString
You can use the ToString overload. Have a look at this page for more info
So just Use myDate.ToString("yyyy-MM-dd HH:mm:ss")
myDate.ToString("yyyy-MM-dd HH:mm:ss")
or something equivalent