Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have Timestamp field like below table, how can i change into15 min interval format?
please consider minimum 15 minutes (ex. 01:28:00 ---> 01:15:00)
Timestamp |
---|
11/20/2017 00:04:00 |
11/20/2017 01:00:00 |
11/20/2017 01:03:00 |
11/20/2017 01:05:12 |
11/20/2017 01:17:00 |
11/20/2017 02:12:15 |
11/20/2017 03:42:10 |
11/20/2017 03:19:42 |
11/20/2017 10:17:12 |
11/20/2017 11:17:15 |
11/20/2017 12:54:10 |
Result |
---|
11/20/2017 00:00:00 |
11/20/2017 01:00:00 |
11/20/2017 01:00:00 |
11/20/2017 01:00:00 |
11/20/2017 01:15:00 |
11/20/2017 02:00:00 |
11/20/2017 03:30:00 |
11/20/2017 03:15:00 |
11/20/2017 10:15:00 |
11/20/2017 11:15:00 |
11/20/2017 12:45:00 |
I think the calculation of floor is throwing it off, try this
Table:
LOAD *,
TimeStamp(Floor(Timestamp, 1/96)) as Result;
LOAD * INLINE [
Timestamp
11/20/2017 00:04:00
11/20/2017 01:00:00
11/20/2017 01:03:00
11/20/2017 01:05:12
11/20/2017 01:17:00
11/20/2017 02:12:15
11/20/2017 03:42:10
11/20/2017 03:19:42
11/20/2017 10:17:12
11/20/2017 11:17:15
11/20/2017 12:54:10
];
May be this
TimeStamp(Floor(TimeStamp, (1/4*24))) as Result
I think the calculation of floor is throwing it off, try this
Table:
LOAD *,
TimeStamp(Floor(Timestamp, 1/96)) as Result;
LOAD * INLINE [
Timestamp
11/20/2017 00:04:00
11/20/2017 01:00:00
11/20/2017 01:03:00
11/20/2017 01:05:12
11/20/2017 01:17:00
11/20/2017 02:12:15
11/20/2017 03:42:10
11/20/2017 03:19:42
11/20/2017 10:17:12
11/20/2017 11:17:15
11/20/2017 12:54:10
];
Timestamp Fields in red
LOAD
Timestamp,
Timestamp(Floor(Timestamp#(Timestamp, 'MM/DD/YYYY hh:mm:ss'), 1/(24*4))) as Result
FROM
[https://community.qlik.com/thread/285559]
(html, codepage is 1252, embedded labels, table is @1);