Hi. If today’s date is after 7/15 (any year), I need to set an earliest date calculated field. In other words, if today is before 7/15/2004, the EarliestDate field should show 7/1/2003. If today is after 7/15/2004, the EarliestDate field show calculate to 7/1/2004.
The problem seems to be in adding the calculated year to the static month/day.
The field is a calculated date field. Here is my code:
REM {The following formula checks that the user cannot select};
REM {a date from the last fiscal year after 7/15 of this year};
Subject: Had another problem with formula, but here is good solution
After changing my last line, the field calculated out to be “7/1/03/08/2005”. As I tried to get it corrected, I found a simpler way to get it. GOOD CODE IS BELOW:
REM {The following formula checks that the user cannot select};
REM {a date from the last fiscal year (7/1 to 6/30) after 7/15 of this year};
Subject: RE: Had another problem with formula, but here is good solution
Your formula still has two problems.1. The date constant [7/15] is not valid. If it compiles at all, it will store the current year in the compiled formula. Next year the formula will fail. To fix this, you can replace it with:
@Date(@Year(@Today); 7; 15)
tmpDate has a dependency on the user’s preferences, so it might fail for some users. To avoid this, you can replace the last two lines with: