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

Time format issue

On bar chart I have Time Field on Y axis, and its shown as like

12:01:30 AM

12:00:30 AM

12:00:00 AM

but I want to convert AM into 24 hr but I could not able to do it.

Can some please help me to convert it into 24 hr time format.

Thanks,

Villyee

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

   Time(Time#('12:01:30 AM', 'hh:mm:ss tt'), 'hh:mm:ss')

Or to use with [Time] field:

   Time(Time#([Time], 'hh:mm:ss tt'), 'hh:mm:ss')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

If Time is already a proper QV time field and you just want to format it to 24hr, you don't need the Time#() part:

   Time([Time], 'hh:mm:ss')

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
arulsettu
Master III
Master III

may be this

Timestamp(Timestamp#('12:01:30 AM','hh:mm:ss TT'),'hh:mm:ss')

vanderson009
Creator III
Creator III
Author

Hi Jonathan,

Thanks for you reply, In database that values in number format, how can I handle it then.

Regards,

Villyee

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

If the Time is loaded as the digit than try this formula:

Time(Time, 'hh:mm:ss').

Screenshot_1.jpg

sunny_talwar

Can you show few datapoints just to make sure we understand how time looks? Is it in decimals like 0.2465214 or is it an integer?

Kushal_Chawda

if it is in number then what that number represents? is it days ? is it hour ? is it seconds?

vanderson009
Creator III
Creator III
Author

When I am doing it in straight table, then getting 24 hr time format, however straight table convert into bar chart then y-axis showing 12 hr format.

vanderson009
Creator III
Creator III
Author

Hi Sunny,

Is it in decimal..