Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a column with a StartTime, followed by columns with extra time in seconds.
For example:
RecNo StartTime TalkTime WaitTime
1 1330 57 120
Startime in this case means 13:30 (hh:mm).
Now, I would like to come up with the EndTime by adding the TalkTime and WaitTime to the StartTime.
In SQL the following works:
CONVERT(VARCHAR(8), DATEADD(SS, Talktime + WaitTime, CallSegmentStart), 108) as EndTime
How can I get this to work in QlikView syntax?
Thanks!
Hello,
Get end time:
=Time#('1330', 'hhmm') + (57 + 120) / 1440
Format end time:
=Time(Time#('1330', 'hhmm') + (57 + 120) / 1440, 'hh:mm')
Still, take care about:
=Time(Time#('2300', 'hhmm') + (30 + 31) / 1440, 'hh:mm') -> 00:01 (next day!)
PS: 1440 = 60 * 24 (minutes in 24 hrs)
Hello,
Get end time:
=Time#('1330', 'hhmm') + (57 + 120) / 1440
Format end time:
=Time(Time#('1330', 'hhmm') + (57 + 120) / 1440, 'hh:mm')
Still, take care about:
=Time(Time#('2300', 'hhmm') + (30 + 31) / 1440, 'hh:mm') -> 00:01 (next day!)
PS: 1440 = 60 * 24 (minutes in 24 hrs)
Thanks @Andrei!
The time was in seconds (which I didn't mention) and the StartTime is in 'hmm' so the formula that works for me is:
Time(Time#('1330', 'hmm') + (30 + 31 ) / 86400, 'hh:mm:ss')
![]()