How to calculate working hours time sheet in daily basis?

0
I want week number of the month if it is april month and todays date is 8 april then i want to know what is the current week no of april month.
asked
5 answers
3

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

 

answered
1

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.

answered
0

Hi   Pranjali Kawale,

Just now I got an idea, we can use this logic to implement the above 

 

 

 

 

 

answered
0

Hi   Pranjali Kawale,

Kindly have look

https://marketplace.mendix.com/link/component/116770

answered
0

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.

answered