January 3, 200719 yr I need to add an expiration date so I created a global field that will take today's date and add 15 days. This is the expiration date. The problem I have is with certain days of the month. When I compare get(CurrentDate) to the set date +15 It thinks it's expired if it's installed on those days. Strangly this only happens on certain dates. My script looks this: Set Field [install_Date;Get(CurrentDate)+15] If [Get(CurrentDate) > Install_Date] Show Custom Dialog End program The problem is that this will not work if the install dates are on 2,3,4,5,6,7,8,9 but will work for all the other days of the month. Why is this so strange? It fails if you put in those dates in the month but not the others. Thanks for any help on this. Edited January 3, 200719 yr by Guest
January 4, 200719 yr Hi that script can't work ! If: Install_Date = Get (CurrentDate) + 15 Get (CurrentDate) will be ALWAYS < Install_Date ! Get (CurrentDate) = Install_Date - 15
January 4, 200719 yr Try something like this: If [ IsEmpty (Expiration_Date )] Set Field [Expiration_Date ; Get( CurrentDate )+15] Else If [Get( CurrentDate ) > Expiration_Date] Show Custom Dialog End If Edited January 4, 200719 yr by Guest Logical correction: Expiration_Date is better !
January 4, 200719 yr Author OMG do I feel stupid. Yes it was a text field. It now works perfectly. Only took me 4 hours of testing before taking 2 min. to post on this site and got the answer quickly.
Create an account or sign in to comment