L
Lichase
I running an update query and getting an overflow error.
I have run this before and no problems just this time. Any ideas on
how i can correct it. Thanks
Function TimeConv(dteStart, dteEnd As Date) As Double
Dim X As Integer, Y As Integer, I As Integer
X = 0
Y = 1
I = 0
X = Int(dteEnd - dteStart + 0.5) ( Debug error(this is the error)
If X > 0 Then
Do Until Y = X + 1
If WeekDay(dteStart + Y) = 1 Or WeekDay(dteStart + Y) = 7 Then
I = I + 1
End If
Y = Y + 1
Loop
TimeConv = ((Abs(dteStart - dteEnd) * 86400) - (I * 86400)) / 3600
Else
TimeConv = Abs(dteStart - dteEnd) * 86400 / 3600
End If
If TimeConv < 0 Then
TimeConv = 1
End If
End Function
I have run this before and no problems just this time. Any ideas on
how i can correct it. Thanks
Function TimeConv(dteStart, dteEnd As Date) As Double
Dim X As Integer, Y As Integer, I As Integer
X = 0
Y = 1
I = 0
X = Int(dteEnd - dteStart + 0.5) ( Debug error(this is the error)
If X > 0 Then
Do Until Y = X + 1
If WeekDay(dteStart + Y) = 1 Or WeekDay(dteStart + Y) = 7 Then
I = I + 1
End If
Y = Y + 1
Loop
TimeConv = ((Abs(dteStart - dteEnd) * 86400) - (I * 86400)) / 3600
Else
TimeConv = Abs(dteStart - dteEnd) * 86400 / 3600
End If
If TimeConv < 0 Then
TimeConv = 1
End If
End Function