A
Adam
All,
I have a module that converts the time which comes out of another ODBC
database application.
Please can you see the below code, is there something wrong that you can
immediately see?
-----------
Function ConvertTime(InputValue As Variant) As Variant
Dim lngHour As Long
Dim lngMinute As Long
Dim lngSecond As Long
If IsNull(InputValue) = False Then
lngSecond = InputValue \ 256
lngMinute = (InputValue Mod 256) \ 65536
lngSecond = InputValue - (lngSecond * 256) - (lngMinute * 65536)
ConvertTime = TimeSerial(lngHour, lngMinute, lngSecond)
Else
ConvertTime = Null
End If
End Function
I have a module that converts the time which comes out of another ODBC
database application.
Please can you see the below code, is there something wrong that you can
immediately see?
-----------
Function ConvertTime(InputValue As Variant) As Variant
Dim lngHour As Long
Dim lngMinute As Long
Dim lngSecond As Long
If IsNull(InputValue) = False Then
lngSecond = InputValue \ 256
lngMinute = (InputValue Mod 256) \ 65536
lngSecond = InputValue - (lngSecond * 256) - (lngMinute * 65536)
ConvertTime = TimeSerial(lngHour, lngMinute, lngSecond)
Else
ConvertTime = Null
End If
End Function