Everything you need to know about how these formulas in Coda.io work

Everything you need to know about how these formulas in Coda.io work

Formulas: WeekNumber(), Weekday(), and WeekdayName()

Category: Dates/Times

WeekNumber()

Weekday()

WeekdayName()

Returns the week number of a date; Jan 1st returns “1”

Another way to say it...

Hey Coda, here’s a date. Which week of the year does this land on?

Returns the number of the weekday of a given date

Or, as one might say...

Hey Coda, here’s a date. As a number, what day of the week is this?

Returns the date as the text of the day of the week

Said differently...

Hey Coda, here’s a date. What day of the week does it fall on?

All three formulas each have one parameter.

DateTime

(DateTime)

The date you want to work with.

Choose any date:

Mar 15, 2023

WeekNumber:

11

The date you chose is week number

11

/52 for the total year. This much of the year has already passed.

00

11

WeekDay:

4

The date you chose falls on a

Wednesday

which is the

4th

day of the week.

Notice, though, that this is only true if you consider Sunday the first day of the week. If Monday is the first day of the week for you, use IsoWeekDay()

Thanks to Coda we know that the date you chose falls on a

Wednesday

!

Localization in Coda

In the United States, Sunday is counted as the first day of the week. In other countries, it is common for Monday to be counted as the first day of the week.

For those of you living in a Country where Monday is the first day of the week, WeekDay() will be a useless formula for you without adding a -1 to the result. Use IsoWeekDay() instead.

Having formulas (and other things like currencies, time, right-to-left language support, etc.) support how other countries and cultures display and understand data is called localization.

There have been many requests for further localization within Coda, and while some strides have been made, there are still lots of improvements Coda can make to support non-US users.

Click into any of the cards below to try you hand at using these formulas! Be careful though, the challenge is rather difficult!

Practice: Find the week number, day and day name of today

Done

Determine your most productive days of the week in a graph

Done

Challenge: Create an advanced progress bar to show someone’s progress towards a goal vs. elapsed time