time expressions

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

How do I say 1 hour in VB.Net.

I'm trying to find out if now - starttime > 1 hour

If Now().Subtract(starttime).ToString > ???????? Then
 
cj.

If now.addhours(-1).ToTicks > Starttime.ToTicks then

I hope this helps,

Cor
 
dim ts as TimeSpan = DateTime.Now.Subtract(startTime)

if (ts.Hours >0) then
Trace.WriteLine("More than an hour has passed since " &
startTime.ToString())
end if


hth,
Alan.
 
Back
Top