Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to change Time Format

In an Analysis Bar chart i have created total working hours of an Employee in time format hh:mm:ss , now its coming on the chart but on y-axis the time stamp starts with 12:00:00 am, 3:00:00 am, 6:00:00 am,12:00:00 pm now i dont want it like this i want my y-axis to show

00:00:00 , 3:00:00,6:00:00,12:00:00,15:00:00,24:00:00. no am pm how can i do it

1 Solution

Accepted Solutions
ToniKautto
Employee
Employee

My recommendation is that you set the format in your script so that it is predefined, and then you simply use the formatted field as your dimension.

If you want to have several formats, you can add a new field.

LOAD

  *,

  Time(Time, 'hh:mm:ss') AS TimeWithOutTT

Inline [

Time

12:00:00 am

3:00:00 am

6:00:00 am

12:00:00 pm

];

If you want to change the entire format in the application simply change the format variable and then reformat the incoming data.

SET TimeFormat='hh:mm:ss';

LOAD

  Time(Time#(Time, 'hh:mm:ss TT')) AS Time

Inline [

Time

12:00:00 am

3:00:00 am

6:00:00 am

12:00:00 pm

];

View solution in original post

1 Reply
ToniKautto
Employee
Employee

My recommendation is that you set the format in your script so that it is predefined, and then you simply use the formatted field as your dimension.

If you want to have several formats, you can add a new field.

LOAD

  *,

  Time(Time, 'hh:mm:ss') AS TimeWithOutTT

Inline [

Time

12:00:00 am

3:00:00 am

6:00:00 am

12:00:00 pm

];

If you want to change the entire format in the application simply change the format variable and then reformat the incoming data.

SET TimeFormat='hh:mm:ss';

LOAD

  Time(Time#(Time, 'hh:mm:ss TT')) AS Time

Inline [

Time

12:00:00 am

3:00:00 am

6:00:00 am

12:00:00 pm

];