Intervalos de hora

Hola a todos!

Tengo una consulta, actualmente requiero sacar el conteo de una variable por intervalos de 15 minutos, algo así
“00:00 a 15:00”,
“15:00 a 30:00”,
“30:00 a 45:00”,
“45:00 a 00:00” tengo el campo de hora tipo string pero no logro sacar ese intervalo de tiempo he intentando de la sigueinte forma
intervalo=extract(‘HH’, parseDate({Hora}, ‘HH:mm:ss’)) * 60 + extract(‘MI’, parseDate({Hora}, ‘HH:mm:ss’))
ifelse(
{intervalo} % 60 < 15, “00:00 a 15:00”,
{intervalo} % 60 < 30, “15:00 a 30:00”,
{intervalo} % 60 < 45, “30:00 a 45:00”,
“45:00 a 00:00”
) pero no me da el intervalo, me podrían ayudar?
image

Hi
To achieve the desired results you need to perform following steps.

  • Parse the time field into a datetime object.
  • Extract the hour and minute components and compute the total minutes since midnight.
  • Determine the correct 15-minute interval.

Hi @Santi98, did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!