Is there a function in .net that will take a number like 134 501 and convert it in time? This time was 13:45:01. I was hoping that I did not need to reinvent the wheel for this.
Assuming you are using today's date:
int timeNumber = 134501; DateTime time = DateTime.ParseExact(timeNumber.ToString().PadLeft(6, '0'), "HHmmss", null);