How can I make a new column that shows the number of days of difference between today and a pre-existing column

Hi this is what I’m using currently, where updatedAt is the pre existing row I’m trying to reference.

{{moment().diff(table1.updatedAt, ‘days’}}
This is giving me a difference of 0 days which is incorrect

I’ve even referred to the moments js doc

If you are trying to create a new column with data from other columns you want to use {{ }}

Yup, exactly! ^ Thank you as always, Ron.

And in your specific example, @Patsy_Count, you’ll likely want to do something like

{{ moment().diff(currentRow.updatedAt, ‘days’) }}

Does that work for you?

Yes it does thank you so much!

1 Like