### Title

How many weeks between dates calculation

### Post

Hello-

I'd like some help with the following calculation.

I'd like a formula to calculate the time differential between to dates, M-F is the working range however I'd like the result as a decimal.

For example: if the start date is a Monday and the finish date is the following Wednesday the result would be 1.6 Weeks. If the start date is a Monday and the finish date is the Wednesday of the same week the result would be .6 Weeks, as weekdays in the ranges should be counted as work days.

Here is the formula I'm working with so far, the result works for total days however I'm having trouble reducing to weeks.

Thank you, -S

5 * Int ( ( EndDate - StartDate ) / 7 ) +Middle ( "0012345501234544012343340123223491111234010012340" ; 7 * (DayOfWeek ( StartDate ) - 1 ) + DayOfWeek ( EndDate ) ; 1 )

rdulys:

The calculation definitely finds the days between the two days, but does not include the day. For example, Monday to Wednesday is two days (which is what the calculation returns), but since you want three days, add one. Therefore, your calculation can be changed to:

(5 * Int ( ( EndDate - StartDate ) / 7 ) +Middle ( "0012345501234544012343340123223491111234010012340" ; 7 * (DayOfWeek ( StartDate ) - 1 ) + DayOfWeek ( EndDate ) ; 1 ) + 1 ) / 5

Try this out and see if this works.

TSGal

FileMaker, Inc.