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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ecrobles18
Contributor III
Contributor III

How to display only the timestamp from a date?

Currently I have a table with multiple date fields that contain a timestamp. I have been asked to separate these two values into separate fields. To isolate the date in the table I have used date(floor(datefield)) and it has worked as it should however, I have used timestamp(datefield) to isolate the timestamp and it seems to be working for only one date. All the other date fields are returning 12:00 am for the timestamp. I should also mention that I have changed the number format to time and still nothing. Below I have provided an example of the issue I am facing. Any help can be provided would be greatly appreciated. Thank you in advance.

Time should be showing up as 9:12:25 AM

  

Time shows up correctly and I have used the same function to isolate time.

  

3 Replies
sunny_talwar

Try this:

Time(Frac([Receive Dt])) as Receive_Time

ecrobles18
Contributor III
Contributor III
Author

So, essentially I would have to script this in order get the result I am looking for?

sunny_talwar

My bad, I think the issue might be that those dates don't have time component attached to them. The way you can check the time component is by adding a num() function and see if the number is an integer or decimal. If it is decimal, then you do have time component, else you just have date with no time.