Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
vengadeshpalani
Creator
Creator

Timestamp Format Conversation

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
1 Solution

Accepted Solutions
sunny_talwar

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

];


Capture.PNG

View solution in original post

3 Replies
sunny_talwar

May be this

TimeStamp(Floor(TimeStamp, (1/4*24))) as Result

sunny_talwar

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

];


Capture.PNG

maxgro
MVP
MVP

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);

1.png