Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
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
Partner

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
Partner

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