Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

dwforest
Valued Contributor

Re: Convert time format

Typo should be 4,2 for mid, not 3,3. This also "assumes" the hour part of your string is always 2 digits.

Time(MakeTime(num(left(FieldName,2)), num(mid(FieldName,4,2))),'hh, m')


Rob's answer of interval does not have this restriction so I would go with that.

MVP
MVP

Re: Convert time format

Or may be this

Table:

LOAD RowNo() as RowNum,

Time,

Num(Interval#(Time, 'h:mm:ss'))*24 as [Time in hour];

LOAD * INLINE [

    Time

    0:02:53

    0:16:48

    0:10:00

    0:14:51

    0:10:00

    0:10:00

    1:19:17

    0:00:00

    0:00:00

    239:00:00

];

Capture.PNG

sophielavielle1
New Contributor II

Re: Convert time format

Thank you it works perfectly!

It was easy in fact..

Highlighted
sophielavielle1
New Contributor II

Re: Convert time format

Thank you it works perfectly!

It was easy in fact..