Use the DateTime.Subtract() method. When you subtract a DateTime from
another DateTime, it returns a TimeSpan, from which you can extract any
portion. Example:
DateTime dt = new DateTime(1, 4, 2005, 12, 12, 0);
TimeSpan ts = DateTime.Now.Subtract(dt);
int hours = ts.TotalHours;
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:22**********************************@microsof t.com...
Hello
I have TextBox1 this keeps date and time information and I need to compare
this DateTime with the current DateTime and find difference in hour. How
can
I do this in VB.Net?
Thanks,