Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Employee
Employee

Re: how to change Time Format

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

];

1 Reply
Employee
Employee

Re: how to change Time Format

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

];

Community Browser