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.

Date Calculation - add months

Featured Replies

I have several fields. Main one being "Date of Accident" calculated from this are various "milestones".

E.g Milestone 1 = Date of Accident + 91 (being three months)

Milestone 2 = milestone 1 + 185 (being six months)

etc etc

1st Question

is this the best way to add set time frames onto a user field??

2nd Question

If Instructions were received Up to and including 30 June 2001 i need to add 30 days, if received on or after 1 July 2001 i need to add 14 days.

DateInstruction + If( DateInstruction >= "01/07/2001", 14 , 30 )

but it doesn't work... it just adds 14 whether it be post or prior to 1/7/2001???

Hi:

1. I would suggest using Month(Milestone). Then you can just add months instead of days.

2. I cant really test this right now, but you might wanna try doing this:

Create another field to perform the calc on DateInstruction. I'll call it DateProjection=

If(DateInstruction <= 7/30/2001, DateInstruction + 30, DateInstruction + 14)

If i read your post correctly grin.gif

Ken

I just realized that I posted an american date format. (30/7/2001)

I have several fields. Main one being "Date of Accident" calculated from this are various "milestones".

E.g Milestone 1 = Date of Accident + 91 (being three months)

Milestone 2 = milestone 1 + 185 (being six months)

etc etc

1st Question

is this the best way to add set time frames onto a user field??

2nd Question

If Instructions were received Up to and including 30 June 2001 i need to add 30 days, if received on or after 1 July 2001 i need to add 14 days.

DateInstruction + If( DateInstruction >= "01/07/2001", 14 , 30 )

but it doesn't work... it just adds 14 whether it be post or prior to 1/7/2001???

Hi,

I have enclosed a small demo file showing how this can be done. I think that it is self explanatory, however, if you have any questions, please feel free to contact me off list or on. I have used regular US dates, so you will need to either settle for military or regular before proceeding with and any calculations, etc. to your file.

HTH

Lee

TEST(date instruction <= DATE(06; 30; 2001) ;date instruction +30; date instruction >= DATE(07; 01; 2001); date instruction+14)

Works for me. But you have to imagine what the french functions could be in an english FM

I think DateNum for DATE and Surely Case for TEST

  • Author

Hi,

Are you able to post it as a zip file???

Cheers

Jan

Assuming that 'DateInstruction' is defined as a date field, the correct syntax will be:

DateInstruction + Case(DateInstruction < Date(7, 1, 2001), 14, 30)

Here you go.

BTW, there is a free StuffIt Expander available from Allidin, just type www.stuffit.com in your browser and that should take you right to their site.

HTH

Lee wink.gif

AccidentAccounting.fp5.zip

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.