# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## Time format (hhmmss) shown wrong

Hi all,

I have a matrix which looks like this:

Carton IDScan Date Scan Time
17690011051122018051181958

The result for the Date is correct, but unfortunately the time is wrong. It should be 08:19:58 (hh:mm:ss)

Much obliged

1 Solution

Accepted Solutions
MVP

## Re: Time format (hhmmss) shown wrong

I think sunilkumarqv‌ might have meant this...

Table:

Time(Time#(TPROA, If(Len(Trim(TPROA)) = 5, 'hmmss', 'hhmmss'))) as [Time-scan-return-carton];

TPROA

81920

182130

];

The above seems to work

8 Replies
MVP

## Re: Time format (hhmmss) shown wrong

Try this (use single h instead of 2)

Time(Time#(TPROA, 'hmmss')) as [Time-scan-return-carton]

New Contributor III

## Re: Time format (hhmmss) shown wrong

Hi Sunny,

unfortunately scan time can be

81920 = 08:19:20 as well as

182130 = 19:21:30 (which are now not shown correctly)

Valued Contributor II

Contributor III

## Re: Time format (hhmmss) shown wrong

Try this, it should work

=Time(Timestamp#(81920,'hmmss'))

Valued Contributor II

## Re: Time format (hhmmss) shown wrong

can you try this

Time(Time#(If(len(TPROA)>5, 'hhmmss','hmmss'))) as [Time-scan-return-carton]

MVP

## Re: Time format (hhmmss) shown wrong

I think sunilkumarqv‌ might have meant this...

Table:

Time(Time#(TPROA, If(Len(Trim(TPROA)) = 5, 'hmmss', 'hhmmss'))) as [Time-scan-return-carton];

TPROA

81920

182130

];

The above seems to work

New Contributor III

## Re: Time format (hhmmss) shown wrong

Hi Sunil,

I like your approach, but it didn't work.

here is the sample

Anything else?

MVP

## Re: Time format (hhmmss) shown wrong

Did you try this?

Table: