
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DATEDIFF
I am new to QuikSense and just starting to evaluate it as a BI tool. I downloaded the free version and am trying to do a simple calculation with DATEDIFF, but get a "not a valid function" error when I attempt to upload the data. I am a SQL novice so there may be an error in my script (below). How in depth a knowledge of SQL does a user need have to develop useful, relevant apps? Where can I find a resource for functions built-in to QlikSense?
DATEDIFF(DD,admit_dt_ts, GETDATE()) as [LOS],
Thanks.
- Tags:
- qlikview_scripting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interval(now() - admit_dt_ts,'DD') as LOS


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DateDiff() is not a valid Qlik Sense function. Manish example should achieve the same.
Here's a link to the reference for Qlik Sense functions:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interval is a best option and function provided by Qlik.

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or simpler,
now() - admit_dt_ts as LOS
Interval() just formats the result into a specified time format. Here you don't need it, since you want it in days and that is what the subtraction returns.
HIC

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please note you can vote on this idea to implement datediff in Qlik Sense :
https://community.qlik.com/t5/Ideas/New-function-Datediff-to-have-the-difference-between-two-dates/i...
Best regards,
Simon
