Bug in week number function

There is no week 1 !

week column is formula weeknum({Date})

And to complete, the “group by week” is working differently than formula week number.
See the 21/02/2021 that is labelled as week 9 in the colum, but grouped with week 8 items

We should have an option for week numbers, as there are multiples case :

  • EU : 1st week with four days
  • USA : week containing January 1st
  • Other : first full week

An option to choose the first day of the week would also be great

EDIT : in addition, it would be GREAT to have to option to not sum the grouped items. i don’t want to sum up week numbers repeated

Hi, if you have looked into the description of the function weeknum() you should have seen this:

Apart from that, we also have a full list of all the functions in the SeaTable Manual - Formula Reference:

Write your formula like weeknum('2021-01-03', 'monday') and you’ll get week 1.

And for your second post: the error is caused by the fact that SeaTable takes Sunday as the start of a week automatically when grouping. Users should have the option to choose the starting day of the week. This is surely a thing that should be improved, so thanks for the report!

1 Like

I’ve seen indeed the option of Monday as week 1, but actually, I must cheat to get the good weeknumber in european format on 2021.
I can’t get the ‘first week with 4 days’ by just pointing the starting day of a week.
And even then, there is something wrong, eg with the table.
Formula is weeknum({When},“Monday”)


Week 1 lasts only 4 days ?

Hi, no big deal.
Oops, this is a bug, good call!
The first 3 days don’t belong to Week 1 in 2021. I have to report this…

In france, week 1 is from 4th to 10th January

There may be less surprises with a set of ISO 8601 time/date functions. See as well https://en.wikipedia.org/wiki/ISO_week_date for the week-date.

Indeed, at this stage, it seems that the main chronological structure lacks a bit of polish or guideline.

You are absolutely right! SeaTable is only 0.5 years old, there’re surely things that still need polishing. We are polishing already :joy:

And you do it well !
I really appreciate the detailed feedbacks and the way things are going on.