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

Strange result from Month calculation


Go to solution Solved by comment,

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

Recommended Posts

  • Newbies
Posted

We were trying to use Month() calculation to set reminder. However, it is not returning the result as intended.

We have a startDate field and would like to add exact 2 months to startDate as reminder. Intended results are:

startDate > reminderDate

19/03/2011 > 18/05/2011

01/11/2011 > 31/12/2012

30/11/2011 > 29/01/2012

31/12/2011 > 29/02/2012

01/01/2012 > 29/02/2012

In remWe used Date(Month(startDate)+2; Day(startDate); Year(startDate))-1

  • Solution
Posted

Try =

 

Let ( [
newDate = Date ( Month ( StartDate ) + 2 ; Day ( StartDate ) ; Year ( StartDate ) ) - 1  ;
limit = Date ( Month ( StartDate ) + 3 ; 0 ; Year ( StartDate ) )
] ;
Min ( newDate ; limit )
)
  • Like 1
  • Newbies
Posted

Hi,

 

Sorry, I used my tiny iphone to compose this message and accidentally pressed on the Post button before I could finish my message.

 

Thanks god that you understand my question and it has been resolved.

 

Many thanks.

This topic is 4375 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.