xpath:date compare

0
I want to get the first day of current month,but i do not know how to get. help me. thanks. for example: [BaseStf.SpecialAttendance_PersonalInformation/BaseStf.PersonalInformation/DepartureDate >  'first day of current month' ]  
asked
3 answers
0

Assuming that the attribute DepartureDate in entity DepartureDate has type DateTime.


Create a variable with name DepartureDate with the type DateTime with value [%BeginOfCurrentMonth%] (make sure you create the variable before the retrieve with XPath).

Then, your XPath should look like so:

[BaseStf.SpecialAttendance_PersonalInformation/BaseStf.PersonalInformation/DepartureDate > $DepartureDate]

 

answered
1

Hello, I think you are looking for '[%BeginOfCurrentMonth%]' or  '[%BeginOfCurrentMonthUTC%]'.

Also see section 3.3 of XPath Keywords & System Variables - Studio Pro 9 Guide | Mendix Documentation

Hope this helps!

 

answered
1

Using token [%BeginOfCurrentMonth%]  you can get the date and time at the beginning of the current month. And then you can parse this value to extract month field from it.

answered