Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculating Working Days Backwards

Featured Replies

Anyone's Help would be greatly appreciated....

In a template that comes with V5.5 there is a file called Calculations

and Scripts. Within that file there is a calculation that calculates the

future end date of a project excluding weekends when given a number of work days. The calculation for the end date is as follows;

StartDate + Int (WorkDays/5) * 7 +

Middle ("12345012340123601256014560345623456",

(DayOfWeek (StartDate) - 1) * 5 +

Mod (WorkDays,5) + 1, 1)

I need it to do the opposite. I have an end date or a Project delivery date. I need to put in the number of days it will take to complete the project and end up with a start date or the date the the project needs to be started by excluding weekends. I read a post in this forum that suggested using the following calculation for the StartDate;

EndDate-Int(WorkDays/5)*7-Mod(WorkDays,5)

This works except, for example, when the end date is a Thurday, say Aug 28, 02 and the WorkDays is only 3. The answer should be Aug 23, but it come back with Aug 25. The "Middle" function in the above example addresses this. But I can't seem to manipulate it to achieve my needs.

I've been racking my brain for a week now. Any help would be immensely appreciated.

Nick Peterson

[email protected]

What would happen if you put a negative number of days into the first (end date) calculation?

Have emailed you a demo...

Russ Baker

Canberra, Australia

cool.gif

Hi Nick,

You can do this... the key here will be to use the

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.