AnsweredAssumed Answered

Find the last day of the last month

Question asked by clo mama on Feb 13, 2019
Latest reply on Feb 14, 2019 by clo mama

Hello,

 

I've got the following field in a table.

Date_LastStatement
30/11/2018
30/11/2018
31/12/2018
31/12/2018
31/12/2018

g_Date_Statement (global field) = 31/1/2019

 

I've written the following script to find all records in the last day of the last month based on the "g_Date_Statement"

 

Set variable [ $$StatementDate ; g_Date_Statement ]

Show all records

Enter find mode []

Set field [ Date_LastStatement ; Date ( Month ( $$StatementDate ) - 1 ; 0 ; Year ( $$StatementDate ) )

Perform find []

 

However, the result is a list of records dated 30/11/2018. What I need is those as of 31/12/2018.

 

What's wrong?

 

Thanks in advance.

Outcomes