Divide week number

Hi, I would like to divide my week number field by 2 in order to group time entry by pay period. Our pay period is two weeks starting on sundays.

Here is the formula I use to get the week number: DATETIME_FORMAT(Date,‘w’)
And here is the formula I use in the pay period field: {# semaine}/2

I get #ERROR! in all the cell of the pay period field.

Precisely. :wink:

This is the expected behaviour when you try to divide a string. You either need to use the WEEKNUMBER() function to derive the weeks as number values, or you need to convert # semaine into a number before attempting to divide it.

Thank you so much.

I used the WEEKNUMBER() function and I was then able to divide it by 2.

1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.