Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to group my timestamps into per 15 min interval.
if(Minute(datetime)<15, Date#(date(datetime, 'yyyy-MM-dd hh:15'), 'yyyy-MM-dd hh:15'),
(if(Minute(datetime)<30, Date#(date(datetime, 'yyyy-MM-dd hh:30'), 'yyyy-MM-dd hh:30'),
(if(Minute(datetime)<45, Date#(date(datetime, 'yyyy-MM-dd hh:45'), 'yyyy-MM-dd hh:45'),
(if(Minute(datetime)>00, Date#(date(datetime, 'yyyy-MM-dd hh:00'), 'yyyy-MM-dd hh:00')
))))) as datetime2
I tried to put into my loadscript. It does not seem to work. The final output i see is skipped by hours.
Pls help.
thanks!
timestamp(ceil(datetime,1/96),'YYYY-MM-DD hh:mm') as datetime2
timestamp(ceil(datetime,1/96),'YYYY-MM-DD hh:mm') as datetime2
Got it. But any reasons why the formula does not give the result?