### Title

Elapsed time [weekdays only] in weeks based on current date.

### Post

I'm looking for help with a calculation that returns the elapsed time in weeks based on the current date.

Example: PrepStartDate is 12/1/2011, today's date is 12/5/2011 result is .6. Each day of the week is .2. One week is 5 x.2 or 1.

Below is an example of the calculation I use in my database that returns the total weeks based on a start and end date.

In addition to knowing the total time period, I would like to know how much time has elapsed based on the current date.

(5 * Int ( ( ProjectPrepEndDate - ProjectPrepStartDate ) / 7 ) +Middle ( "0012345501234544012343340123223491111234010012340" ; 7 * (DayOfWeek ( ProjectPrepStartDate ) - 1 ) + DayOfWeek ( ProjectPrepEndDate ) ; 1)+1)/5

Thank you,

shogun

We're missing a left Parenthesis.

Updating the original calculation to take advantage of newer features and to correct the typo:

Let ( [ End = Get (CurrentDate ) ; Start = ProjectPrepStartDate ] ;

(5 * Int ( ( End - Start ) / 7 ) +Middle ( "00123455012345440123433401232234

01111234010012340" ; 7 * (DayOfWeek ( Start ) - 1 ) + DayOfWeek ( End ) ; 1)+1)/5) // Let