Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

calculate diff bw two Timestamp excluding weekends in hrs and min format

Hi all,

Please help me to calculate the difference bw two timestamp and should excluded the weekends .

example :

start date 6/1/2016  4:34:29 AM and    end date 2/1/2016  2:43:18 AM

in hours and mins format

12 Replies
Anonymous
Not applicable

try like this?

=Interval(Enddate-Startdate, 'mm')

This is assuming that your timestamps are recognized correctly in QV.

Works fine if you define them like this:

let Startdate = num(timestamp#('2012/10/02  11:55:25 PM','YYYY/MM/DD  hh:mm:ss TT'));

let Enddate= num(timestamp#('2012/10/03  01:55:26 AM','YYYY/MM/DD  hh:mm:ss TT'));

Kushal_Chawda

what is the week end for you? Saturday, Sunday , because it may differ for different geography.

Anonymous
Not applicable

sunilkumarqv
Specialist II
Specialist II
Author

thanks for sharing

but want output should be  00hrs 00mm format .

sunilkumarqv
Specialist II
Specialist II
Author

Hi Kush ,

weekend should saturday and sunday

but output should be 00 hrs 00 mns format

thanks in advance

Kushal_Chawda

Does this also involves specific business hours? Like Your business hours is 10:00 Am to 5:00 PM so time before and after should not be considered in calculation?

sunilkumarqv
Specialist II
Specialist II
Author

Don't have any business rules

sunilkumarqv
Specialist II
Specialist II
Author

Any advice please