Diff between date fields from different rows


for some time now I am collecting specific data each and every day. I need to check their trends and how much or fast they increase or decrease. Using the “created” field gives me only correct data if I collect it every day at the exact same time. Is there a way to calculate the diff in whatever format between the current rows date field and the previous one? Maybe something like the data processing?


You can convert the date in an integer (using a combination of month() and day() function) and then use the data processing operation “Calculate delta”.

That could work if I would just assume a different measure than minutes or hours. The difference between the exact time on different days would be 1000 then. I could use that.

day(2022-09-05) gives a “5” instead of “05” for the day. Hours and minutes also give you a single digit instead of the leading 0.

How about converting to seconds? That’s not too complicated.

Sure, then normalize your values.

Is there a way to convert to unix timestamps using formulas or only with a script?

Just in case this is still helpful for someone. I found a pretty simple way to do this. You only need a column with a reference date (the same for all rows) that is somewhere outside of the date ranges of the relevant dates in the table (e.g. 1885-01-01). Now with a datdiff formula to this reference date in the needed format (e.g. “D” or “M” etc.) you get an integer that you can easily work with as suggested by @rdb using data processing. Hope that helps!

1 Like

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