Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
aaronnayan
Creator III
Creator III

How to calculate date difference to Todays date

Hi Guys,

I have a date field. "[DatePurchased]

How would i calculate the difference from today's date? for example if the value of my date field [DatePurchased] was 15/01/2018, the new calculation would come up with 7

i.e:

date((date([DatePurchased],'MM/DD/YYY')-date([DatePurchased],'MM/DD/YYYY')),'DD')

I want the result in days

Thank you guys

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

it should be simply:

Today()-[DatePurchased]
This will return the number of days and the time difference.
If you want in whole days only:
Floor(Today())-Floor([DatePurchased])

View solution in original post

3 Replies
petter
Partner - Champion III
Partner - Champion III

it should be simply:

Today()-[DatePurchased]
This will return the number of days and the time difference.
If you want in whole days only:
Floor(Today())-Floor([DatePurchased])
sunny_talwar

May be this

Today() - DatePurchased

shiveshsingh
Master
Master

hi

Today()- DatePurchased