Datedif between a field, and todays date

I have a field named invoicedate, which is the date the invoice was sent to the consumer. I want to create a calculated field which is a datedif between that field, and todays date. This means i can have a table of invoices which were sent x days ago, and then flag whether they have been paid or not.

How can i create a date dif between a field (“InvoiceDate”), and todays (rolling) date to return the numbers of days between these two dates?

@HarveyB-B
Can you try

dateDiff(now(), {InvoiceDate},'DD')

Ref : dateDiff - Amazon QuickSight
Now - Amazon QuickSight

Thanks for the reply, this worked well, i just had to swap now and invoicedate around otherwise the response was a negative

dateDiff(InvoiceDate,now(),‘DD’)

Marking @HarveyB-B 's last post as solution.
Fix the quotes around DD if you copy paste that calc.

Regards,
Arun Santhosh
Pr QuickSight SA

1 Like