Jump to content

This topic is 8051 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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???

Posted

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

Posted

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

Posted

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

Posted

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

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

This topic is 8051 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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