J
John
I have 2 datetime values and I need to calculate the time between them, not
counting saturdays and sundays. The output format should be:
1. Number of days with one decimal: example 9,6 (numeric)
For this I currently use round(Now-DateTimeIn,1)
2. In days, hours, minutes, second: example 12:03:23:21 (string)
For this I currently use a function that uses:
interval = Now - DateTimeIn
days = Fix(CSng(interval))
hours = Format(interval, "h")
minutes = Format(interval, "n")
seconds = Format(interval, "s")
I found several functions on the internet that calculate the fixed number of
working days. None of them has the output in the 2 formats as described
above.
Can someone give me a hint on how to achieve this?
Thanks in advance,
John
counting saturdays and sundays. The output format should be:
1. Number of days with one decimal: example 9,6 (numeric)
For this I currently use round(Now-DateTimeIn,1)
2. In days, hours, minutes, second: example 12:03:23:21 (string)
For this I currently use a function that uses:
interval = Now - DateTimeIn
days = Fix(CSng(interval))
hours = Format(interval, "h")
minutes = Format(interval, "n")
seconds = Format(interval, "s")
I found several functions on the internet that calculate the fixed number of
working days. None of them has the output in the 2 formats as described
above.
Can someone give me a hint on how to achieve this?
Thanks in advance,
John