Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Elapsed time calcualtion

Can some one please tell me how to calculate the number of days between today's date and a previous date, such as "CASE_OPEN_DTTM""

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

In your load script? I'm assuming that the unspecified character string CASE_OPEN_DTTM is the name of a field containing a regular date? Then you can use:

LOAD

  :

  Floor(today() - CASE_OPEN_DTTM) As NoOfDays,

  :

FROM sourcefile.

Best,

Peter

sunny_talwar

In addition to what Peter‌ mentioned, you can also:

  • Use Interval() if you need hours and minutes

Interval(Now() - CASE_OPEN_DTTM, 'D hh:mm:ss') as TimeBetween

  • Use you need just the working days, you can use NetWorkingDays

NetWorkDays(CASE_OPEN_DTTM, Today()) as NetWorkDaysBetween