Oct 06, 2020 09:46 AM
We are managing all our orders in Airtable and I’m trying to calculate the time between orders to get an average for each customer.
So a client orders, say on September 13, and then the same client orders again September 19 and September 25. I’ve been trying to figure out a solution, but have a hard time.
How can I calculate the datetime_diff between records in the same table?
Thanks a lot!
Oct 06, 2020 12:27 PM
Hi @Rupert_Hoffschmidt1 - you can’t do datetime_diff between records, only fields on the same record.
What I would recommend here is:
Oct 06, 2020 02:27 PM
Since the order records are linked to a record in another table, you could use a somewhat convoluted series of Rollups to calculate over your records.
Here’s an example base which does something similar (it has more fields than you need since it calculates the difference between a field other than the date):