[Simple (?) ] I need a Xpath query for previous month.

0
Hello Mx Community, I have a “createdDate” system member and I need a Xpath for a  widget filter that constrains to “previous month” only. From what I tried I noticed functions are limited in Xpath, I can’t use addMonths( ,-1) and such. All I have is “createdDate”, any ideas? Many thanks!
asked
2 answers
4

You can use something like

 

 

[createdDate > '[%BeginOfCurrentMonth%] - [%MonthLength%]'  ]
[createdDate < '[%BeginOfCurrentMonth%]']

 

Mind the quotes and the spaces around minus

 

answered
1

this one can also be helpful

https://docs.mendix.com/refguide/xpath-month-from-datetime/

 

 

answered