I'm working in Visual Studio 2008.
I have a string input in the format "hh:mm:ss" which I want to convert into a dateTime in the same format.
I have used the Convert.ToDateTime() function which converts it but adds a date to it as well. Is there a way to convert it without adding the date?
scanStartString = "08:00:00"
scanStart = Convert.ToDateTime(scanStartString)
'scanStart = "16/05/2011 08:00:00"
No. Try TimeSpan instead:
Dim time = TimeSpan.Parse("08:00:00")