Set date and time attribute to week number

0
Hi everyone! Is it possible to set the date and time attribute of an object to the current week number? If so, how is this achieved? And how can I then use this value to show only objects of the current week in XPath (How do I calculate the current week in XPath and compare this to the week attribute of the object)?  Thanks in advance!
asked
1 answers
1

If you mean to do this in a microflow, then yes:

formatDateTime($someDateVariable, ‘w’)

See https://docs.mendix.com/refguide/parse-and-format-date-function-calls

If you mean in the domain definition, then yes but only as a calculated value. You will need to connect a microflow to do this.

But if you want to select objects and restrict to a dateattribute being a certain weeknumber, than in the retrieve-activity use the function week-from-datetime:

answered