How To Subtract a number of days from a date column

Hello everyone, so I have a table in Coda doc which contains a column with date format. I want to create a next column which contain the dates from the previous column but subtracted 45 days (45 days before the date in the first column). I can do this easily in Excel, but somehow I can’t do this in Coda. Can anyone help me?

Dear @Bernardus_Bambang_Herjuno

Welcome to the Coda Maker Community

I assume that it’s this what you are looking for:

I tried that. but I got this error:

My formula looks like this:
= Table 1.Deadline PKWT - 45

Problem Solved. I directly referenced the column not using the Table 1 Name. Thank you!

1 Like

Your formula should look like

thisRow.[Deadline PKWT] - 45

or even better, more explicitly

thisRow.[Deadline PKWT] - Days(45)

because the former way relies on the fact that Coda calculates dates as numbers (Excel style), which might change eventually.

You can omit the thisRow but it’ll still mean thisRow.
When you use TableName.Column this means read the whole column — i.e. a list of values, one value for every row.

1 Like

Thanks for the additional explanation @Paul_Danyliuk :mortar_board:, valuable input for everyone willing to learn the Coda logic!

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