Skip to main content
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