

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create Intervals of every 15 minutes
Hi All,
I need to get this in a hurry.
I have a Calculated Dimension TIME(class(aggr(Time,Time),.25/24)) which gives me intervals of every 15 minutes
I want to create this in the Script, how can I do it
Regards
Alan
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, whats the rule? The four first digits denote hhmm ?
If so, you could use
Time(Floor(Time#(Left([Time-added],4),'hhmm'),1/24/4),'hh:mm')
I.e. first unpack the first four digits, then interpret them as hhmm, then round downwards to nearest quarter, then format as time again.
HIC


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried:
Time( class( TIME, .25/24)) as TimeBucket
TIME being your time field


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swuehl,
I am getting all results as 00:00:00, do I need to format as Time hh:mm
Regards
Alan


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
Timestamp(floor(frac([Your field])*96)/96+floor([Your field]),'m/d/yyyy hh:mm TT') //96 rounds to 15 mins

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If swuehl 's formula returns zero all the time (00:00:00), then your field TIME cannot be interpreted correctly... You probably need to interpret the field using Time#().
HIC


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Henric
I am getting my Time field from the original [Time-added], and for this I have to reformat as below
So to get the TimeBucket Interval I require I tried what you see below (line2)
Am I even close to getting what I need?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe I need to add the format in before the format out?

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you make it too complicated...
First of all, if you load [Time-added] as it is - no formatting, no anything - what do you get then? A string? Or a number? And what does the string look like?
Secondly, you use a formatting function Num() inside your Time#() function. This may destroy whatever information you might have in the field... Normally, you should have an interpretation function inside your formatting function, i.e. Time(Time#(...))
HIC


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Henric,
My [Time-added] lookslike this

- « Previous Replies
-
- 1
- 2
- Next Replies »