Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

10 min time interval

I have the check in time data (ex: 20:02:30) and I'm trying to group them into 15 min intervals to analyze their evolution along the day. Don't know how to fix it.... help will be very appreciated.

Thanks

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

You need to format that field as you wish. Something like:

Timestamp(floor(frac([Hora])*144)/144+floor([Hora]),'M/D/YY hh:mm TT') as YourNewFieldName,

View solution in original post

11 Replies
m_woolf
Master II
Master II

This code rounds to the lowest 30 minutes. Changing the 48 to 96 should round to the lowest 15 minutes.

=floor(frac(STARTTIME)*48)/48+floor(STARTTIME)    //QV next lowest half hour (1/48 of day)

Not applicable
Author

sorry, I was trying to group them into 10 min interval but 15 min fix it anyway....   I'm a newbie and your code gives me the following error message... "sentence unknown"

thanks so much

m_woolf
Master II
Master II

Replace the 48s with 144s for 10 minutes.

Did you replace STARTTIME with the fieldname of your Timestamp field?

Not applicable
Author

One stupid question... where I am supposed to write that code line? Because I am sitll having the same error

m_woolf
Master II
Master II

In your load script. Did you end the line with a comma?

=floor(frac(STARTTIME)*48)/48+floor(STARTTIME),

Not applicable
Author

Maybe I'm forgetting something... I got this:

SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='#.##0,00 €;-#.##0,00 €';
SET TimeFormat='h:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';
SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';
SET DayNames='lun;mar;mié;jue;vie;sáb;dom';


LOAD Centro,
     Años,
     [Fecha de documento],
     [Hora],  */this is timestamp/*
     [Valor económico]
    

FROM

\\psf\Home\Desktop\DATOFINAL.xlsx
(ooxml, embedded labels);

=floor(frac([Hora])*48)/48+floor([Hora]),

m_woolf
Master II
Master II

LOAD Centro,

     Años,

     [Fecha de documento],

     [Hora],  */this is timestamp/*

     floor(frac([Hora])*144)/144+floor([Hora]) as YourNewFieldName,

     [Valor económico]

    

FROM

\\psf\Home\Desktop\DATOFINAL.xlsx
(ooxml, embedded labels);

Not applicable
Author

Ok, I get It... but I think it's not what I was looking for. What I want is:

17:23:20 ...

17:24:21 ...

Grouping these timestamps into 17.20-17.30 interval

17:37:21 ...

17:38:21 ...

17.30-17.40 interval....

m_woolf
Master II
Master II

And what do you get with the new field?