Help

Divide week number

Topic Labels: Formulas
950 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Pierre-Alexand2
6 - Interface Innovator
6 - Interface Innovator

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.

Capture d’écran de 2020-11-30 08-32-57

2 Replies 2

Precisely. :winking_face:

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.

Pierre-Alexand2
6 - Interface Innovator
6 - Interface Innovator

Thank you so much.

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