Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikconsultant
Creator III
Creator III

Working with timestamp (Round minutes)

Hi,

I try to compare timestamps. But i need only the date (DD.MM.YYYY) and time (hour and minutes (HH:MM)). How can I get the time in a seperate value and the secounds rounded?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try  time(frac(floor(Mydate,1/1440)),'hh:mm') as MyTime


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

Try  time(frac(floor(Mydate,1/1440)),'hh:mm') as MyTime


talk is cheap, supply exceeds demand
qlikconsultant
Creator III
Creator III
Author

It works but how should be the code for the date?

Gysbert_Wassenaar

date(MyDate,'DD.MM.YYYY') should be enough. If you want to get rid of the hours and minutes etc to keep only whole days use date(floor(MyDate),'DD.MM.YYYY')


talk is cheap, supply exceeds demand
Anonymous
Not applicable

Using floor() cuts off the fractions on the data level, and it can save a lot in the file size.

squeakie_pig
Creator II
Creator II

>>date(MyDate,'DD.MM.YYYY') should be enough. If you want to get rid of the hours and minutes etc to keep only whole days use date(floor(MyDate),'DD.MM.YYYY')

daystart(MyDate) is handy to get rid of the hours and minutes