Click here to Skip to main content
15,900,589 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Sir,

I am getting an error here:

Shift_Time1- Double
Time _Out- String



If Convert.ToString(rstTemp(TIME_OUT)) <> 0000-00-00 00:00:00 Then

Shift_Time1 = GetTimeDiff(rstTemp(TIME_IN), rstTemp(TIME_OUT), 0)

End

Thanks,
Naren
Posted
Comments
Sergey Alexandrovich Kryukov 25-Sep-12 21:58pm    
What make you think that these types could be assignment-compatible? Of course, they are unrelated. You have DBNull data, should check for it and perform some default action...
--SA

1 solution

VB
....
If(rstTemp(TIME_OUT) IsNot DBNull.Value
Shift_Time1 = GetTimeDiff(rstTemp(TIME_IN), rstTemp(TIME_OUT), 0)
....
 
Share this answer
 
Comments
narendrag999 25-Sep-12 23:44pm    
Thank you sir...
Kuthuparakkal 25-Sep-12 23:47pm    
you're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900