Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Converting a string to Time Format

Hi,

First, im new to qlikview

i Have a problem with a data that i import throw ODBC connection..

i tried with #time function,

and load time stamp.

i will be very happy if someone can help me with that , and if the solution is something in the "Edit Script" it will be great if you tell me where exact to put the code or function ... (i'm using a code like that: ODBC CONNECT TO ... SQL SELECT * FROM TABLE.DAILY WHERE EMP=1234 AND DATE='01/01/2011';)

the Time is stored as a string like that:

700

715

730

745

800

etc...

and

1600

1615

1630

1645

1700

as you can see it's not like some post that i already found some solution to string like that:

800

850 (8:30)

900

thanks!

1 Solution

Accepted Solutions
Not applicable
Author

try with

time(time#(num(TheTime,'0000'),'hhmm')) as TheTime

View solution in original post

2 Replies
Not applicable
Author

try with

time(time#(num(TheTime,'0000'),'hhmm')) as TheTime

Not applicable
Author

Hi again,

Juan - thank you very much,

but I'd like you to help me with one more thing.

when i put your code in the script editor it's load just the new filed...

i'm sure that i do something wrong.

can you help me with that? i attach a screenshot of the code.

thanks!

QV.png