See the documentation here: https://docs.mendix.com/refguide/parse-and-format-date-function-calls
And do note https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat.html
Look for the Week in year.
Regards,
Ronald
Here you need to get the days between first day of month and current day of month as a decimal variable, dividing the decimal number by 7 and making that round to get a integer variable and then compairing with 0,1,2,3,4 to get the week number. week number will be 1 if the calculated variable is 0 and so on.
Hi Pranjali Kawale,
Just now I got an idea, we can use this logic to implement the above
If I am not mistaken then this will work perfectly fine:
weeksBetween([%BeginOfCurrentMonthUTC%], [%BeginOfCurrentDayUTC%]) + 1
You may or may not use the UTC version, depending on your usecase.