Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
crispolo
New Contributor III

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

6 Replies
prma7799
Honored Contributor III

Re: Manage Time

Please share some sample file

prma7799
Honored Contributor III

Re: Manage Time

Try with Time#  function

jmvilaplanap
Valued Contributor

Re: Manage Time

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

Regards

MVP
MVP

Re: Manage Time

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
Honored Contributor

Re: Manage Time

Здравствуй,

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

Regsrds,

Андрей

micheledenardi
Valued Contributor

Re: Manage Time

Use interval function:

LOAD

     User,

    interval(Duration) as Duration       

FROM

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