Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping by 30 Minute intervals 1

Status
Not open for further replies.

PhilMyWallet

Technical User
Feb 20, 2002
84
0
0
GB
My data is collected in 15 minute intervals.

I can group by hour, minute, seconds. Is there any way I can group the data by 30 minute intervals?


Cheers



Phil
Crystal v.8.5
 
You could group by 15 minute intervals using a formula field that says ToText({your.time}, "HH:mm").

You want 30 minute intervals. Get the time in minutes and try Multiply (Truncate({minutes/30)) * 30. Or check for 15 and 45 and turn them into 00 and 30. Either way, use the converted value in place of "{your.time}".

Once it becomes text rather than time, you might have trouble with the date if you use dates. Maybe one group for date and another for time.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Create a formula called HalfHour.

@HalfHour
Code:
if Minute({Orders.Ship Date}) < 30 
THEN Time(Hour({Orders.Ship Date}),00,00 )
else Time(Hour({Orders.Ship Date}),30,00)

Group your report by Hour and then by the HalfHour formula.


Bob Suruncle
 
Grouping on this more generic formula should do the trick.
damon

Code:
truncate((hour({table.datefield}) * 60 + minute({table.datefield}))/30)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top