Your system Culture settings usually deturmines the
ToString
format. You can check it by doing the following:
Dim culture = Globalization.CultureInfo.CurrentCulture
Dim CultureName = culture.Name
Dim shortDateFormatString = culture.DateTimeFormat.ShortDatePattern
Dim longDateFormatString = culture.DateTimeFormat.LongDatePattern
If you want to force the formatting of dates, then you can pass a formate to
ToString
as it is overloaded to support custom formatting:
Dim reversedDate = Date.Now.ToString("yy-dd-mm")
You can read more about it here:
Custom Date and Time Format Strings[
^]