I have a reporting table with two date columns. When a new row is created, the first column is automatically populated with the date it was created. The row next to it is supposed to subtract 7 days from the first column’s date. However, now matter how I write the formula, I keep getting either: 12/23/1899 (same month, same day, but a year that is 124 years ago! Go figure!) OR literally “7 days ago”.
I think you’ve stumbled upon a cool little oddity with Coda that I’ve never seen before. I’ve managed to replicate the issue you’re facing and, oddly, it’s dependent on the order you created those specific columns.
What I think Coda does when you have some “value for new rows” set in your table, is it runs through those columns in the order they were created and populates their values. When I replicate your table in my own doc, if I create the column “Reporting On” before I create the column “Week Of”, then your formulas work as expected. However, if I create “Week Of” first, then your oddity pops up.
So my theory is that your “Week Of” column is trying to calculate a date based on “Reporting on”, but Coda just hasn’t populated that value yet.
Interesting!
Anyways, the solution is pretty simple in this case. Just change the “Week Of” formula for new rows from thisRow.Reporting On - Days(7) to Today() - Days(7). That way, it’s no longer dependent on “Reporting On” being populated.