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: 
Anonymous
Not applicable

Manage Time

Hi guys,

          I've a table with field Duration, the data is a time, for example:

UserDuration
A36:10:45

B

12:45:29
C45:55:26

36:10:45

where first part are hours, second are minutes and the third are seconds.

Now when I load this field there are two ways, first:

     load Duration

     from ....

but the result is a single number, for example 15,54, and I don't want this;

second:

     load Time(Duration, 'hh:mm:ss') as duration

     from ...

but if the source value is 36:10:45, qlikview load 12:10:45, and I don't want this.

I'd like to get this result: 36:10:45.

It's possible?

Thanks

Labels (1)
6 Replies
prma7799
Master III
Master III

Please share some sample file

prma7799
Master III
Master III

Try with Time#  function

jmvilaplanap
Specialist
Specialist

The function to load an string as time is time#(Duration, 'hh:mm:ss') this will convert the string to a time field.

Regards

MK_QSL
MVP
MVP

OAD User,

     Time#(Duration,'hh:mm:ss') as Duration

FROM

[https://community.qlik.com/thread/266243]

(html, codepage is 1252, embedded labels, table is @1);

ahaahaaha
Partner - Master
Partner - Master

Здравствуй,

Смотрите прикрепленный файл. В принципе , и поэтому поле обычно загружен. Может быть , это настройки QlikView на моем компьютере. В качестве обходного пути, вы можете создать текстовое поле (поле [NewDuration] в прикрепленном файле).

Regsrds,

Андрей

micheledenardi
Specialist II
Specialist II

Use interval function:

LOAD

     User,

    interval(Duration) as Duration       

FROM

[test.xlsx] (ooxml, embedded labels, table is Sheet1);

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.