Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

time

hello,

I have my field in this form '10 / 20/2013 11:34:00 p.m. 'and I just would like to retrieve the time. how?

6 Replies
Gysbert_Wassenaar

=time#(PurgeChar(right('10 / 20/2013 11:34:00 p.m.',13),'.'),'hh:mm:ss tt')


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

Use Frac(), like:

Load

          Time(Frac(YourField)) as Time

er_mohit
Master II
Master II

Try this in text object

=time(time#('10/20/2013 11:34:00 p.m.','MM/DD/YYYY hh:mm:ss tf'),'hh:mm:ss tt')

Not applicable
Author

II tried but it shows me nothing

Anonymous
Not applicable
Author

use the Mid function

Mid(Fieldname, time starting string no, time end string no)

Another type is

Use the Timestamp function

timestamp(fieldname, 'Time format')

tresesco
MVP
MVP

That could be because your data is not really of timestamp nature. In that case it has to be parsed properly so that qv can read it as a timestamp. Try like:

Time(Frac(time#(YourField, 'MM/DD/YYY hh:mm:ss tt') )) as time

Ensure that 'MM/DD/YYY hh:mm:ss tt' is exactly same (even spaces would be considered)