Anyone knows what "returnType" in week functions is for?


The functions =weekDayName() & =weekNumber can have a second parameter “returnType”. I tried to fill different stuff in it, but always ended up in an error.

What is it for?

1 Like

Not sure, I found this confusing too


Dear Daniel,

Please see the screenshot, it returns the week number, often used in planning tools.
is this the answer on your question?

Kind regards,
Jean Pierre


Hey @Jean_Pierre_Traets I actually mean the second parameter in the function. According to the formula popup, you can add a “returnType” after the date.

1 Like

Are you able to reverse the WeekNumber() and display the Starting date or the Actual week. For example:

Week 1 = Jan 1 - Jan 8

I love that I can go from a date to a week number, but having the ability to go back would be fantastic.



Hey guys! I’m Irvin, an engineer at Coda. As you might expect, the “returnType” parameter currently doesn’t do anything :slight_smile:

This may change in the future with the thinking that the “returnType” parameter lets you configure how you map each day of week to a number. For example, the current behavior has WeekDay(Sunday) = 1, meaning Sunday maps to the start of the week. But with an optional “returnType”, you could specify the mapping so that Weekday(Monday, "startWithMonday") = 1.

1 Like

@Tim_Wirick unfortunately no specific functions like that yet! You’d be able to create it with these two functions though:

Start Date: Date(2018, 1, 1) + 7 * [week number]
End Date: Date(2018, 1, 8) + 7 * [week number]

E.g. [week number] of 3 gives Jan 22 - Jan 2


Thanks for the info Irvin. Can‘t wait for the implementation:)

1 Like

@irvinzhan19 - YOU DA BOMB! That worked PERFECTLY.