Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Query on time function

Hi, i am trying to display a time field properly as a dimension, my data for this field is in the following format..

093025

which is the correct format but its missing the colons (09:30:25)

How do i insert the colons? i have tried but all i am getting is 00:00:00..

Thanks

1 Solution

Accepted Solutions
SunilChauhan
Champion
Champion

left(fieldname,2)&':'&mid(fieldname,3,2)&':'&right(fieldname,2) as Newfield name in script

or you can use in expression also

Sunil Chauhan

View solution in original post

5 Replies
its_anandrjs

Hi,

Use time stamp function

Rgds

Anand

SunilChauhan
Champion
Champion

left(fieldname,2)&':'&mid(fieldname,3,2)&':'&right(fieldname,2) as Newfield name in script

or you can use in expression also

Sunil Chauhan
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

TimeStamp function returns 00:00:00

Thanks Sunil, i have used your suggestion in an expression.

its_anandrjs

Hi,

See how the time stamp is used by below example

Raw:

load * inline

[

COl

093025

];

Data:

Load

left(COl,2)  as HH,

mid(COl,3,2) as MM,

Right(COl,2) as SS,

Timestamp#((left(COl,2) &':'& mid(COl,3,2) &':'& Right(COl,2) ),'HH:MM:SS') as a

Resident Raw;

See the sample file

Rgds

Anand

its_anandrjs

Hi,

Can you check it my way hope you got it if so mark it correct or helpful answer.

Rgds

Anand