Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Partner
Partner

Format of time from variable

Hi,

I have txt file contains variable declared in that file. I have assigned variable as "7" and it is working fine if I have to change it to "7:45" then it is not working. The variable should behave like time. Can any one please suggest me how to resolve it?

Tags (1)
8 Replies
prma7799
Honored Contributor III

Re: Format of time from variable

Please share some sample app.

Re: Format of time from variable

I am assuming you are defining in Input Box, When you entered as time it consider as Time itself. You have to re modify that in Variable Itself. If i am wrong, You would explain little more

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: Format of time from variable

Hello Anil,

I have to compare the value in variable with datepart hours. If I provide value in variable as 7 it compares properly but if I take it  as 7:45 then it is throwing error about not specified ":"

Re: Format of time from variable

That's for i mention Qlikview gives the output as always our inputs only. If you have 7 as variable stored then how you are enter 7:45. Still not confirmed the reason. Can you release the key as you required (May be images) then we can talk about the troubleshoot

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: Format of time from variable

Now I change the value in variable as "7:45" and then while comparing it is showing error. I am trying to upload the scenario.

Re: Format of time from variable

Would you able to provide Scenario. And that include you have to declare single quotes for that, May be like '7:45'

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
qlikviewnovice
Valued Contributor II

Re: Format of time from variable

Give it in single quotes. It will work

vinieme12
Esteemed Contributor II

Re: Format of time from variable

use Time() with Time#()

time(time#(TheTime,'h:mm')) as TheTime