January 17, 200323 yr 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???
January 17, 200323 yr 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 Ken
January 17, 200323 yr 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
January 17, 200323 yr 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
January 17, 200323 yr Assuming that 'DateInstruction' is defined as a date field, the correct syntax will be: DateInstruction + Case(DateInstruction < Date(7, 1, 2001), 14, 30)
January 17, 200323 yr 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 AccidentAccounting.fp5.zip
Create an account or sign in to comment