Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

TimeStamp Function

Could you please help me in converting following below BO query into Qlikview

TIMESTAMPDIFF(4, char(TIMESTAMP(( (CASE WHEN(1-1=0) THEN (TIMESTAMP(current date, current time)) ELSE

("HistoryTable".START_TIME) END) ))-TIMESTAMP(( "HistoryTable".END_TIME ))))

1 Reply
Not applicable
Author

Hi,

the chunk of code

TIMESTAMPDIFF(4, char(TIMESTAMP(( (CASE WHEN(1-1=0) THEN (TIMESTAMP(current date, current time)) ELSE

("HistoryTable".START_TIME) END) ))-TIMESTAMP(( "HistoryTable".END_TIME ))))

is basically trying to calculate the difference in dates "HistoryTable".START_TIME and "HistoryTable".END_TIME.

You can use

Load  ("HistoryTable".END_TIME - HistoryTable".START_TIME ) as DiffDays from table..

in qlikview, but needs to take care of the system date fromat and date format of the data in the table.

As you know when you load date in Qlikview it will interpret the date in the local system date fromat that you can see in the first tab of the script.

Cheers.