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
I like:
Dim timeFormat As String = "yyyy-MM-dd HH:mm:ss" myDate.ToString(timeFormat)
Easy to maintain if you need to use it in several parts of your code, date formats always seem to change sooner or later.