DateTime.ToString

The easiest way to obtain a date/time in a a specific format is to use the ToString method

dtDateTime.ToString("dddd, dd mmm yy") = "Monday, 18 Jul 06" 

dtDateTime.ToString("m") = ?? 



You must use "MM" and not "mm" when converting a DateTime to a specific text format

objDataRow.Item("Birthday") = Me.dtpClientBirthday.Value.ToString("dd/MM/yyyy") 

String to DateTime
String to TimeSpan



© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext