I am trying to convert a time column in my data set to an integer. Been trying different way but cannot get it to work:
Code:
Dim ts As New TimeSpan
ts = TimeSpan.Parse(myRow.Item(3))
Dim zDate As New Date(ts.Ticks)
Dim myTime As Integer = Format(zDate, "HHmmss")
Example: If time is 09:35:48 I need to covert it to 093548.
Error: Conversion from type 'TimeSpan' to type 'String' is not valid.