Depends on your definition of "within 2 weeks"
If ( get ( CurrentDate ) < ( datefield - 14 ) ; 1 ; 0 )
Should return 1 for all dates where datefield is either in the past or no more than 14 days in the future.
It can be simplified to just: get ( CurrentDate ) < ( datefield - 14 )
And if this is defined for a field, it must be an unstored field of type calculation or it won't update as the current date changes.
Ok, so it sounds like "14" is the way to define two weeks in this case. Thanks.
I'm not sure I follow you with the simplified version. It looks the same... Are you saying this shouldn't be an IF function?
It might help to define further what I'm trying to do:
I want an Field_ALERT to turn red if CurrentDate is within 2 weeks of separate DateField.
Currently, Field_ALERT is a calc field with the above IF calculation.
I have Field_ALERT conditionally formatted to turn red if Field_ALERT = 1
Let me know if I'm going about this the wrong way. Thanks!
Just to get values of 1 or 0 you do not need the If function.
Boolean expressions that are true return 1 and False return 0 so using the IF funciton isn't needed here.
Your conditional format expression can be simplified the same way to jsut read: field_ALERT.
(I use the IF function anyway sometimes as it just seems a bit less cryptic to me, but that's solely a personal preference.)