Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert number values into time

Hello,

This is a re-post as I may have not been very clear in the original!

I have a simple x/y graph and need to display the actual time seen in the data source (See attached). At the moment, all I'm seeing is a 5 minutes interval scale. I've tried using =Time(Time,'hh:mm') but this does not make any difference.


I've seen this issue in excel sometimes and usually, the numbers can be converted by checking the format or applying some thing alongh the lines of =TIME(LEFT(A1,2),RIGHT(A1,2),)



For the Dimension I have:

=Time(Time,‘hh:mm’)

For the Expression I have :

The condition is

max({State1}Time)>0

The definition is

avg({$<
[Field1]
=State1::[Field1a],
     
[Field2]
=State1::[Field2],
              
[Field3]
=State1::[ Field3],
                    
Field4
=State1:: Field4
>}
Results)


I cannot share the file for privacy reasons however can provide any details required to help.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You are using a continuous x-axis, right?

Have you tried changing the cont. axis format to Time on Number tab of chart properties?

View solution in original post

5 Replies
Not applicable
Author

Hi Mike,

Can you send one value of row as example or specify the mask of your date?

swuehl
MVP
MVP

You are using a continuous x-axis, right?

Have you tried changing the cont. axis format to Time on Number tab of chart properties?

rubenmarin

In the png seems than Time has values like 0.90 ¿Wich time is this? ¿90 minutes or 54 minutes (90% of an hour)?

As Marcos saids, we'll need a sample to check the values, dates are tricky, you see one thing but you can't know the number behind that string (if there is one, and it should be to really be a time or date).

If 0.90 means 90 minutes you can try to change your dimension to:

=Time(Interval#(Time, 'h.mm'))

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hi Mike,

You can make your field time by doing this:

Time(maketime( Left(A1,2), RIGHT(A1,2)), 'hh:mm') as Time

if A1 is something like this: '09:30'.

And then use this field as your dimension and in your expression

Not applicable
Author

Sometimes it's the simplest things we miss.

Thanks very much!