How can I use arithmetic operation in native synchronization configuration?

0
Hi Everyone, I’m using Mendix 8.18.2 trying to get the requests of last 2 months data only. (i.e) I need to download only the datas of request which are submitted from the last two months only in the synchronization configuration. How can I achieve that in the Xpath and I’m not able to use arithmetic operation for reducing the days from current day and time. So any one can suggest me how to overcome this scenario.
asked
2 answers
0

Hi,

You can use Xpath as below:

//ModuleName.Entity[DateRegistered > '[%BeginOfCurrentMonth%] - 1 * [%MonthLength%]' and //ModuleName.Entity[DateRegistered < '[%EndOfCurrentMonth%] - 1 * [%MonthLength%]

 

answered
0

Hi,

For arithmatic operations, you can use ‘daysBetween’ function or 'trimToDays' function. 

This returns a float value, so you can use round(), floor() functions depending on the requirements which will return integer value.

See Documentation : https://docs.mendix.com/refguide/between-date-function-calls

https://docs.mendix.com/refguide/trim-to-date#:~:text=5%20trimToDays%5BUTC%5D,uses%20the%20UTC%20time%20zone.

answered