var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help with Time difference
I have the following calc:
=Format(Int((DateDiff("n",[Receive Time],[Deliver Time]))/60),0) & " Hours and " & Format(Int((DateDiff("n",[Receive Time],[Deliver Time])))-(Int((DateDiff("n",[Receive Time],[Deliver Time]))/60)*60),0) & " Minutes"
It works great when calculating the time diff within one day, however if the receive date is yesterday and the deliver date is today, it will give a negative # and it will be incorrect.
Any help is appreciated..
First thing I would do is check the number of days difference using the datediff
then I would take the result of that and multiply by 24
then take the Currenttime and subtract it from 12:00
and finally add the two together...
the code for this is fairly simple so give it a shot let me know if you need anymore help
What is the real-world business model you are trying to support? What result to you expect to see? At first glance, i would say it's difficult to to receive something before it's been delivered...
Oh, and uh... have a look at the Abs() function... The modulo operator (%) is useful for pulling minutes as well...