MK9885
Master II
2020-12-08
01:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get only time from a Data Time string
Hi,
How can I get only time from below field?
I just want 11:35 or 12:25 etc
I used Time# and other functions but doesn't work.. maybe because this string has YYYY-MM-DD HH:MM:SS and then some 000000...
Those 0000's in the end doesn't give me correct time. I just get time as 00:00.
- Tags:
- new_to_qlikview
612 Views
1 Solution
Accepted Solutions
MayilVahanan
MVP
2020-12-08
10:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MK9885
I think, your field in string format, try like below
=mid('2020-10-12 11:35:00.0000', 12, 5)
Mid(urtimestampfield, 12, 5)
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Please close the thread by marking correct answer & give likes if you like the post.
3 Replies
PriyankaShivhare
Creator II
2020-12-08
09:44 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Time(Frac(DateTimeField),'hh:mm')
MayilVahanan
MVP
2020-12-08
10:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MK9885
I think, your field in string format, try like below
=mid('2020-10-12 11:35:00.0000', 12, 5)
Mid(urtimestampfield, 12, 5)
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Please close the thread by marking correct answer & give likes if you like the post.
MK9885
Master II
2020-12-09
11:25 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Mayi
Mid(urtimestampfield, 12, 5) << worked
541 Views