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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Stamp to Time

Good Day i have Problem with this TimeStamp that i would like it to converted into time.

Sample:

2012-10-16 09:21:01 the output must be 9:21

But in time

time(left(right(time,8),5),'HH:MM') as Time output is 00:12?

can somebody give me idea?

Thank you,

1 Solution

Accepted Solutions
Not applicable
Author

U can use the below expression.

=timestamp(Timestamp('2012-10-16 09:21:01', 'YYYY--MM-DD HH:MM:SS'),'h:mm')

~Kabilan K.

View solution in original post

6 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

first, you need to convert your string to a timestamp, and then format it any way you want. The syntax should be something like this:

timestamp( 

       timestamp#(MyTime, 'YYYY-MM-DD hh:mm:ss')

, 'hh:mm')

notice that the hours, minutes and seconds are represented by the lower case letters : hh:mm:ss, in contrast to YYYY-MM-DD

cheers,

Oleg Troyansky

Not applicable
Author

timestamp(timestamp#(timelogs, 'YYYY-MM-DD hh:mm:ss'),'hh:mm') as Time no Output
and i tried this one
time(timestamp#(timelogs, 'YYYY-MM-DD hh:mm:ss'),'hh:mm') as Time no Output too.


Thank you for your Response

Not applicable
Author

U can use the below expression.

=timestamp(Timestamp('2012-10-16 09:21:01', 'YYYY--MM-DD HH:MM:SS'),'h:mm')

~Kabilan K.

Not applicable
Author

Got it Thank you.

praveenak
Partner - Contributor II
Partner - Contributor II

Hi,

I think u can use the below exp.

=time('2012-10-16 09:21:01','h:mm')

Koniki
Contributor II
Contributor II

=time('2019-07-28 09:21:01','h:mm')