Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reserved word for converting seconds to time in QV?

Does QV have a reserved word or a specific format to convert seconds into minutes?

Thank you!

Sarah

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


saraht wrote:Does QV have a reserved word or a specific format


If you wanted a Qlikview time value, then:

=timestamp#(seconds, 's')

To display the value a minutes:

=interval(timestamp#(seconds, 's'), 'm')

-Rob

View solution in original post

5 Replies
johnw
Champion III
Champion III

I don't think so. I would divide by 60. Unless I'm not understanding what you're asking.

Not applicable
Author

Thank you John, that's what I thought.

Sarah

johnw
Champion III
Champion III

Not that I would EVER do this, but I DID just think of a way to convert from seconds to minutes without ever "knowing" how many seconds are in a minute.

num(num#(text(interval(interval#(SecondsField,'ssssss'),'mmmmmm'))),'#,##0')

You tell QlikView to interpret your SecondsField as an interval in seconds (ssssss). Then you tell it you want to see that interval formatted as minutes (mmmmmm). Then you tell it to convert that to text, and finally to a number (if you went directly to a number, you'd get QlikView's internal representation of an interval, which isn't what we want here).

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


saraht wrote:Does QV have a reserved word or a specific format


If you wanted a Qlikview time value, then:

=timestamp#(seconds, 's')

To display the value a minutes:

=interval(timestamp#(seconds, 's'), 'm')

-Rob

Not applicable
Author

In the 'Number' tab be sure to set the 'Number Format Settings' to 'Interval' or the format will be incorrect.