Convert Birthdate to the right date

1
Hi All,   This is my first Question, Ive searched for some time but i cant find the right answer. Before our database has localize set for Birthdate. Now we've set this straight, but for some birthdays people are still a day younger and that's nice but its wrong. I'm trying to make a list from this table only for people which birthdate time settings are set at 22:00 or 23:00 and than add 2 or 1 hours but it seems that i cannot combine a contains with any other function.   [contains(toString(DateOfBirth), '22:00') or contains(toString(DateOfBirth), '23:00')]   [contains(toString(DateOfBirth),'22:00') or contains(toString(DateOfBirth),'23:00')]   [contains(DateOfBirth(22)) or contains(DateOfBirth(23))]   Neither does only tostring? [toString(DateOfBirth(22)) or toString(DateOfBirth(23))]   Or just formatdatetime on birthdate [contains(formatDateTime[DateOfBirth]),'22:00'] Please advice
asked
2 answers
3

Hi Arjan,

you should be able to achieve that by using these XPath functions

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

e.g.

[hours-from-dateTime(DateAttribute)=23]

regards, Fabian

answered
1

We'll one more question if you're up to it.

Later on when setting the right birthdate.

Why does it accept this code when setting the new time and not the xpath functions?

 

answered