6 Replies Latest reply on Dec 6, 2011 4:29 PM by shogun

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

    shogun

      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