Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
My question is if i could sum timestamps into hours.
I've a file with statistics that has date and timestamp ie.
2012-05-01 17:01 3
2012-05-01 17:04 7
2012-05-01 17:15 2
2012-05-01 17:44 1
(3, 7 , 2, 1 is number of articles sold)
I would like to sum every line into hours.
so the above rows would be: 2012-05-01 18.00 13
Is this possible?
//BR
Patrik
I would probably create a new field in the script:
LOAD
*,
Date(Floor(Timestamp)+(Hour(Timestamp)*(1/24)),'YYYY-MM-DD hh:mm') AS DateHour
FROM.....;
Then, in your chart just use DateHour as the dimension as Sum(Stats) as the expression.
Hope this helps,
Jason
I would probably create a new field in the script:
LOAD
*,
Date(Floor(Timestamp)+(Hour(Timestamp)*(1/24)),'YYYY-MM-DD hh:mm') AS DateHour
FROM.....;
Then, in your chart just use DateHour as the dimension as Sum(Stats) as the expression.
Hope this helps,
Jason
Hi,
Create a new field at script level with
Subfield(Subfield(TimestampField,' ',2),':',1)
Above expression will give you 17 in all timestamp value where hour value is 17. Now u can add up your articles using this field.
Regards
Ankur