Answer the question
In order to leave comments, you need to log in
How to round time in increments of 15 minutes?
For example 14:44:43 = 14:45:00. For example 14:24:43 = 14:30:00
Answer the question
In order to leave comments, you need to log in
found a solution
(date_trunc('hour', (now() AT TIME ZONE 'Europe/Moscow')::time) +
ceil(date_part('minute', (now() AT TIME ZONE 'Europe/Moscow')::time)::decimal / 15) * interval '15 min')::time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question