calculate duration without week end

| makeresults count=5 
| eval aging=random()%25 
| eval end=_time 
| eval start=end-(aging*86400) 
| eval range=mvrange(start, end, 86400) 
| convert ctime(range) timeformat="%+" 
| eval BusinessDays=mvcount(mvfilter(NOT match(range,"(Sun|Sat).*")))

purpose:

calculate a duration excluding week end days

requirements:

comments:

if you have a start and end time : calculate the duration in business days, excluding week end. using mvrange.