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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
SonPhan
Partner - Creator
Partner - Creator

Round Timestamps

Hello Qlik-Experts,

i have a question, how can i do something like this:

If it the time is e.g. between half past eight and 9:00, the outcome should be 8:30. Depending on the time the respective hours should apply. 

Date Time Expected Solution
04.01.2021 08:39:52 10.02.2021 08:30:00
04.01.2021 08:40:48 04.01.2021 08:30:00
04.01.2021 08:54:05 04.01.2021 08:30:00
04.01.2021 09:00:51 04.01.2021 09:00:00
04.01.2021 09:20:20 04.01.2021 09:00:00
04.01.2021 09:29:17 04.01.2021 09:00:00
04.01.2021 09:30:38 04.01.2021 09:30:00
04.01.2021 09:50:13 04.01.2021 09:30:00
04.01.2021 09:55:03 04.01.2021 09:30:00

Best regards Son

Labels (1)
1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi 

Try 

Date &' '&round(Time,'00:30:00')

and may be force the format to timestamp like this 

Timestamp#(Date &' '&round(Time,'00:30:00'),'dd.mm.yyyy hh:mm:ss') 

View solution in original post

3 Replies
brunobertels
Master
Master

Hi 

Try 

Date &' '&round(Time,'00:30:00')

and may be force the format to timestamp like this 

Timestamp#(Date &' '&round(Time,'00:30:00'),'dd.mm.yyyy hh:mm:ss') 

SonPhan
Partner - Creator
Partner - Creator
Author

Hello,

unfortunately the solution is wrong, the yellow marked lines must be 08:30 and 09:00

SonPhan_0-1658164333914.png

 

But thank you!

SonPhan
Partner - Creator
Partner - Creator
Author

But i think floor(TIME, '00:30:00') should be the solution.

 

Many thanks to you!