Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
harson
Contributor III
Contributor III

Rounding time down to nearest 30 minute Interval

Hello,

Does anyone know how to round down to the nearest 30 minute interval with date and time stamps?

Ex :

01/01/2018 07 :05 :00            to          07 :00 :00

01/01/2018 07 :29 :00            to          07 :00 :00

01/01/2018 07 :30 :00            to          07 :30 :00

01/01/2018 07 :59 :00            to          07 :30 :00

01/01/2018 08 :00 :00            to          08 :00 :00

Thanks,

Tsiry

4 Replies
zhadrakas
Specialist II
Specialist II

try like this

=time(round(frac(Time), 1/24/2) , 'hh:mm:ss')

tresesco
MVP
MVP

Or, may be using floor() to round it down ? like:

time(floor(frac(date#(time,'dd/MM/yyyy hh :mm :ss')), 1/24/2) , 'hh:mm:ss')

marcus_sommer

Please do not double-posting: Rounding time down to nearest 30 minute Interval

Miguel_Angel_Baeyens

Basically it has been said already but you can find more examples here:

Grouping records with timestamp into 30 min intervals

Add Hours to Timestamp