Day of the week calculation


I just came across this post which offer a workaround for the day .
The post gave following solution.

SeaTable has no function to convert a date into the corresponding weekday (e.g., Monday, Tuesday, …)

You can still do it, but it’s a bit more complicated. I would use two formula columns:

  1. if(isempty(“Date”),“”, weekday({Date}, “Monday”)) → this will return the day in the week with Monday being day 1
  2. switch({name_of_column_with_formula_1},1, “Monday”,2, “Tuesday”,3, “Wednesday”,4, “Thursday”,5, “Friday”,“”)

I made a new column called “capture”. It’s column type is date . I tried using above formula but it gives syntax error . Can anyone explain this with an example step by step.

Thank you.

I was the one that provided the solution and it works.

I guess the “” are not correctly interpreted. In your post, the are slanted double quotes. They must be normal quotes or normal double quotes.

I copy pasted your solution. But it gives syntax error showing ( as error.

Do I need to modify any part of formula to make it work?
I am not a programmer so need assistance in this formula

Can you give any example to explain the formula please?

And I told you that the formula works and what the most likely explanation for the syntax error is.

You do not have to be a programmer.

I encourage you to consult the formula reference.

Finally, I also ask you to read this article.

Hi Pindiplus,

As Ralph said, the syntax problem is the use of double quotes:
Incorrect: “ ”
Correct: " "
If the incorrect ones slip into the formula it throws an error. I often use TExtEdit in iMac and it automatically corrects the double quotes to the wrong ones for programming. So, I have to use another editor for programming

1 Like

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