Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to calculate the Date & time difference in hours excluding the weekends. i have a below expression, which provides time difference in hours. But i need to exclude the weekends as well in this.
interval(timestamp2 - timestamp1,'hh')
looking for any suggestion.
Hi,
considering 2 variables:
v1 = 2020-08-21 20:00:00 (older timestamp)
v2 = 2020-08-24 21:00:00 (newer timestamp)
This expression will use the NetWorkDays function to get the working days (excluding weekends), and the second part will calculate the difference on the time part:
=interval((NetWorkDays('$(v1)', '$(v2)') - 1) + (frac('$(v2)') - frac('$(v1)')),'hh')
Hi Fosuzuki,
I think your solution works when v2 is greater than v1 variable. But in my case, some times, v1 is greater than v2.
Regards,
Deepak K M