Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
michelle_mattes
Contributor
Contributor

Incorporate Number of Days with Time

I am trying to incorporate the number of days into a time value.  The statement is IF(DAYSDIFF2 > 0, INTERVAL(DAYSDIFF2 - CLIENT_FILE_CALCTME + NCRXCALCTME,'HH:MM:SS'))

Field DAYSDIFF2 is a number, such a 8

CLIENT_FILE_CALCTIME is  00:12:21 (HH:MM:SS)

MMMCALCTME is 02:12:43 (HH:MM:SS)

result from statement is 1039900:00:1177

What is the correct way to have this display as 194:00:22 (if my manual calculation is correct)?

Any help is greatly appreciated.

Thanks!

Michelle

1 Reply
swuehl
MVP
MVP

Not sure how you get the large number with the strange format (four digit seconds).

In general, note that the format code for the time part should be 'hh:mm:ss', 'MM' denotes Month, so case is important.

Have you set the format in the script? Are your fields text values or do they show a numeric part (i.e. the are dual values)? Is MMMCALCTME or NCRXCALCTME the correct field in your expression?

If I use

= IF(8 > 0, INTERVAL(8 - '00:12:21' + '02:12:43','hh:mm:ss'))

and having 'hh:mm:ss' as my default time format (so the default number parsing will consume the text values), I do get

as result in a text box

194:00:22