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.

DECIMALS IN DATE CALCULATIONS - LOOKING FOR HELP!

Featured Replies

Am working with day/date calculations in which the length of an assignment (working period) may be 1.5 days. I have not previously had cause to deal with the decimal element in any projects I have done to date but now need to. Any help or insight would be greatly appreciated.

Have been trying unsuccessfully to locate info on the right elements to modify my start and end date and duration of assignment fields so as to incorporate the decimal elements of my project requirements.

1. To calculate an end date based on the start date field and time assigned to an assignment field, I am using this calculation in a script:

Let ( [ Array="23456034560145601256012360123412345"; Array2="12345012340123601256014560345623456";

Days=Int(Project::durationofshot / 5) * 7; Offset=Middle(Array;(DayOfWeek(ProjectApptOverview::ApptDateStart_k) - .1) * 5 + Mod(Abs(Project::durationofshot); 5) + .1; .1) ;

Offset2=Middle(Array2;(DayOfWeek(ProjectApptOverview::ApptDateStart_k) - .1) * 5 + Mod(Project::durationofshot; 5) + .1;.1) ]; Case(

Project::exclude weekends<>.1; ProjectApptOverview::ApptDateStart_k + Project::durationofshot ; Case( Project::durationofshot < 0;

ProjectApptOverview::ApptDateStart_k + Days - Offset; ProjectApptOverview::ApptDateStart_k + Days + Offset2) ) // End Case ) // End Let

Objective: the end date should reflect the 1.5 day element in the time assigned field (duration of shot). Instead, the end date currently calcuates as 1 day, not 1.5.

2. To calculate the total length of the assignment (work period), I am using this calculation in a field:

Case( not( IsEmpty(ProjectApptOverview::ApptDateStart_k) or IsEmpty(ProjectApptOverview::ApptDateEnd) ) ; 5 * Int( (ProjectApptOverview::ApptDateEnd - ProjectApptOverview::ApptDateStart_k)/7 ) + Middle( "0123455123455512344451233345122234511123450012345 " ; 7 * ( DayOfWeek(ProjectApptOverview::ApptDateStart_k) - 1 ) + Mod( ProjectApptOverview::ApptDateEnd-ProjectApptOverview::ApptDateStart_k; 7 ) + 1 ; 1 ) )

Objective: this calculation currently produces a 1 day result when the actual total work period is 1.5.

3. To automatically calculate the start date of the NEXT assignment, based on the end date of the previous assignment, I use this formula in a field:

tracker end date + Int ( days between shots / 5 ) * 7 + Middle ( "12345012340123601256014560345623456" ; ( DayOfWeek ( tracker end date ) - 1 ) * 5 + Mod (days between shots ; 5 ) + 1 ; 1 )

Objective: if an assignment is 1.5 days in length, the start date of the next assignment should fall on the same end day as the previous assignment. Currently, the calculation is showing the start date of the next assignment as the day after the end date of the previous assignment.

Thanks so much. Tony.

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.