Question: how to calculate difference between two times in vb.net?
Answer: If you want to compare two times, you should use DateTime and subtract them both, which will give you a TimeSpan . You cannot give a TimeSpan a value of '2am', you you should use DateTime for that. Consider: var date1 = DateTime.