Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jamesehunt
Contributor III
Contributor III

Time format (hhmmss) shown wrong

Hi all,

I have a matrix which looks like this:

Carton IDScan Date Scan Time
17690011051122018051181958

In the  "Data load editor" I added the following

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

Can someone please help.

Much obliged

1 Solution

Accepted Solutions
sunny_talwar

I think sunilkumarqv‌ might have meant this...

Table:

LOAD *,

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

LOAD * Inline [

TPROA

81920

182130

];

The above seems to work

Capture.PNG

View solution in original post

8 Replies
sunny_talwar

Try this (use single h instead of 2)

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

jamesehunt
Contributor III
Contributor III
Author

Hi Sunny,

unfortunately scan time can be

81920 = 08:19:20 as well as

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

sunilkumarqv
Specialist II
Specialist II

please share sample

dsharmaqv
Creator III
Creator III

Try this, it should work

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

sunilkumarqv
Specialist II
Specialist II

can you try this


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

sunny_talwar

I think sunilkumarqv‌ might have meant this...

Table:

LOAD *,

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

LOAD * Inline [

TPROA

81920

182130

];

The above seems to work

Capture.PNG

jamesehunt
Contributor III
Contributor III
Author

Hi Sunil,

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

here is the sample

Anything else?

sunny_talwar

Did you try this?

Table:

LOAD *,

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

LOAD * Inline [

TPROA

81920

182130

];