Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6535 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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 by Guest
Posted

Hi

that script can't work !

If: Install_Date = Get (CurrentDate) + 15

Get (CurrentDate) will be ALWAYS < Install_Date !

Get (CurrentDate) = Install_Date - 15

Posted (edited)

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 by Guest
Logical correction: Expiration_Date is better !
Posted

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.

This topic is 6535 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.