Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Nipija
Contributor
Contributor

Timestamp - 823 should not be 20:23

I have a timestamp in my imported data. I tried to use timestamp format hh:mm in the data handle. We have 24h format and time stamps don’t work for me if data are 823, 934 since it return data as 20:23, 21:34. I want to have 8:23 and 9:34. Other time stamps as 1023 work fine since its 4 digits. Better to solve in expression? How to get correct time from 823 and 1023.

1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

Whats you code for transforming the time. did you try something like below
==Time(Time#(TIME_FIELD,if(len(TIME_FIELD)=4,'hhmm','hmm')) ,'hh:mm')

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

Whats you code for transforming the time. did you try something like below
==Time(Time#(TIME_FIELD,if(len(TIME_FIELD)=4,'hhmm','hmm')) ,'hh:mm')
Nipija
Contributor
Contributor
Author

I tried a similar expression.Will try this again.
I Solved this with a own table with a "translation" for all possible timestamps. 731 -> 7:31. I will try to do it the "right" way with an expression.

Timestamps seems to be integer in the SQL sp the time 00:01 will be 1. I will not need the timestamps during the night for this case, but my translation table will work if needed.

Nipija
Contributor
Contributor
Author

Your expression works fine.