I’m creating a task-management system where I want a new week to start each Monday. I’m using Isoweeknumber() to calculate the week number, but I need help figuring out how to determine the weekday. The formula weekday() marks Sunday as day 1 each week, but I want it to be 7.
I solved this by using a lookup on a support table with the weekday names and iso numbers. I’m still interested in learning if there is a way to manage without a helper table.
hi @Bjorn_Hansell ,
since the Coda standard is that Sunday is the first day of the week and not Monday, you might consider this kind of logic:
Switchif(
thisRow.DayNbr=1,"7",
thisRow.DayNbr=2,"1",
thisRow.DayNbr=3,"2",
thisRow.DayNbr=4,"3",
thisRow.DayNbr=5,"4",
thisRow.DayNbr=6,"5",
thisRow.DayNbr=7,"6",
""
)
cheers, Christiaan
2 Likes
Hi @Christiaan_Huizer , good point.
An even shorter way would be:
Remainder([DayNbr]-2, 7)+1
9 Likes
4 Likes