P0lar
Member
I have some times and need to know how many minutes there are to a 15 minute interval in vb. here's my code:
where tmFirst is the time as a string, e.g. "07:00"
the trouble is that although
and
my full formula is returning 28 - 28 = -1.776E-15 instead of 28 - 28 = 0
Code:
stVal = (WorksheetFunction.RoundUp(CDate(tmFirst) * 96, 0)) - (CDate(tmFirst) * 96)
where tmFirst is the time as a string, e.g. "07:00"
the trouble is that although
Code:
(WorksheetFunction.RoundUp(CDate(tmFirst) * 96, 0)) = 28
Code:
(CDate(tmFirst) * 96) = 28
my full formula is returning 28 - 28 = -1.776E-15 instead of 28 - 28 = 0