Skip to Content
0
Former Member
Apr 06, 2015 at 08:42 PM

How to eliminate weekends with this date range

17 Views

Hi Folks,

I got below code to find Seconds between two date like

Starting Date: 01/03/2015 10:01:25

Ending Date: 30/03/2015 09:20:14

I want to eliminate the weekends under this given date and calcualte the total numbers of days between two dates

With below code I can able to calucalte number of seconds between two dates

=If(IsError(DaysBetween([Created on] ;[Modified
Date]) * 86400

+

(

ToNumber(FormatDate([Modified Date];"HH")) * 3600 +
ToNumber(Left(FormatDate([Modified Date] ;"mm:ss") ;2)) * 60 +

ToNumber(FormatDate([Modified Date] ;"ss"))

)

-

(

ToNumber(FormatDate([Created on] ;"HH")) * 3600 +

ToNumber(Left(FormatDate([Created on] ;"mm:ss") ;2)) * 60 +

ToNumber(FormatDate([Created on] ;"ss"))

));0;



DaysBetween([Created on] ;[Modified Date]) * 86400

+

(

ToNumber(FormatDate([Modified Date];"HH")) * 3600 +

ToNumber(Left(FormatDate([Modified Date] ;"mm:ss") ;2)) * 60 +

ToNumber(FormatDate([Modified Date] ;"ss"))

)

-

(

ToNumber(FormatDate([Created on] ;"HH")) * 3600 +

ToNumber(Left(FormatDate([Created on] ;"mm:ss") ;2)) * 60 +

ToNumber(FormatDate([Created on] ;"ss"))

))