Matt Leach Posted August 5, 2010 Posted August 5, 2010 (edited) Im working on a calculation that references a pre-edfined date field. The if statement i am tryin to create is: if datefield < currentdate and > datefiled + 30 This is the exact calculation i have entered but it does not appear to work: TechSupport::SW PD 2 > Get ( CurrentDate) and TechSupport::SW PD 2 < TechSupport::SW PD 2 + 30 To give you some background on what i am tryin to accomplish: The date field is a maintenance date, so lets say that their maintenance expires 7/31/10. They have a 30 day grace period from the date of expiration. so i want to mark the record to show that they are in a crace period if the current date is anywhere between 8/1 and 8/31 so if the current date is greater than the maintenance date, but less than the maintenance date + 30, then i want to show the record is in a grace period. Hope it makes sense Edited August 5, 2010 by Guest
bruceR Posted August 5, 2010 Posted August 5, 2010 (edited) Use parentheses to ensure the calc is evaluating per your intention. But the second part doesn't make sense. X will always be less than X + 30. (TechSupport::SW PD 2 > Get ( CurrentDate)) and (TechSupport::SW PD 2 < TechSupport::SW PD 2 + 30) Edited August 5, 2010 by Guest
comment Posted August 5, 2010 Posted August 5, 2010 Try = Datefield < Get (CurrentDate) and Get (CurrentDate) < Datefield + 30
Matt Leach Posted August 5, 2010 Author Posted August 5, 2010 My apologies, after re-reading what i had posted, the second part was supposed to read current date < date + 30 but it now works flawlessly, thank you
Recommended Posts
This topic is 5282 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 accountSign in
Already have an account? Sign in here.
Sign In Now