Hi,
Is ther a simple way to calculate number of hours in a date range. (dtFrom
as date , dtTo as date)
Had a look at timespan, but can's see that it's possible to add dates.
"Totto" <ta*********@norcon.no> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Hi, Is ther a simple way to calculate number of hours in a date range. (dtFrom as date , dtTo as date) Had a look at timespan, but can's see that it's possible to add dates.
Hi, Is ther a simple way to calculate number of hours in a date range. (dtFrom as date , dtTo as date) Had a look at timespan, but can's see that it's possible to add dates.
Calculate hours or add dates?
dim ts as timespan
ts = dtto.subtract(dtfrom)
msgbox(ts.totalhours)
Add days to a date:
d = d.adddays(5)
Is ther a simple way to calculate number of hours in a date range. (dtFrom as date , dtTo as date) Had a look at timespan, but can's see that it's possible to add dates.
\\\
Dim ts As TimeSpan = d1.Subtract(d2)
MsgBox(ts.TotalHours.ToString())
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>