Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qw_johan
Creator
Creator

Time format

Hi,

I ran into a strange time format in one of the files I am loading. I can't get Qlikview to recognize it.

0,000243056

I can get Excel to format it correctly. According to Excel "00:00:21".

Does anyone know how to format/convert it in Qlikview?

Thanks,
Johan

1 Solution

Accepted Solutions
hector
Specialist
Specialist

Hi

use time(Field) and it will return "00:00:21", if you have your timeformat variable with hh:mm:ss

Rgds

Ps. be carefull with the ',', because the decimal separator must be '.'

View solution in original post

3 Replies
erichshiino
Partner - Master
Partner - Master

All dates and timestamps in QlikView and Excel are just numbers.

What you see is just a mask that format numbers into days, hours, etc.

1 unit = 1 day, 1 hour = 1 /24 , 1 second = 1 / 24/3600 and so on.

to apply the timestamp mask back again, use this:

timestamp( yourFieldHere,'hh:mm:ss'')

you can replace the field by anything else (e.g. an expression) to work with charts.

You can check the article about timestamp on the help to get more details.

Rgds,

hector
Specialist
Specialist

Hi

use time(Field) and it will return "00:00:21", if you have your timeformat variable with hh:mm:ss

Rgds

Ps. be carefull with the ',', because the decimal separator must be '.'

qw_johan
Creator
Creator
Author

Thank you so much Hector! I'd kiss you if I could. SmileSmile
I have been pulling my hair out over this. I was using the time() function...but you pointed one thing out to me the
importance of the separator being '.' and not ','. In my file it is ...guess what...yup... ',' . I just used Replace()....and it worked.
Time(Replace(Field, ',', '.'), 'hh:mm:ss')

Thanks again