Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

converting time

Hello All,

Could you please help me convert 0530 into '05:30:00' in the load script.

Many Thanks,

Hasvine

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Time(Time#(TimeField, 'hhmm'), 'hh:mm:ss') as TimeField

View solution in original post

4 Replies
sunny_talwar

Try this:

Time(Time#(TimeField, 'hhmm'), 'hh:mm:ss') as TimeField

Not applicable
Author

Thank you.

Working great.

KR,

Hasvine

sunny_talwar

Great

I am glad it works.

Best,

Sunny

maxgro
MVP
MVP

you need the interpretation function Time# to convert the input value to a number

Time#('0530', 'hhmm')

then if you want a different format from the format you have at the beginning of your QlikView (.qvw), mine is

SET TimeFormat='hh:mm:ss';

you need the formatting function Time

Time(Time#('0530', 'hhmm'), 'hh:mm:ss')

replace 0530 with your field

and if you want more detail

QlikView Date fields

The Date Function