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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group By 2 Hours

Status
Not open for further replies.

PhilMyWallet

Technical User
Feb 20, 2002
84
GB
Is there anyway I can group my report by every 2 hours. I can do this standard for each hour, however I need to produce a report which has subtotal each 2 hours.

I use v 8.


Cheers


Phil
 
Try 2*(Truncate(({hour}/2), 0)). 6 and 7 should both become 6, 8 and 9 should both become 8.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
[yinyang] Windows XP & Crystal 10 [yinyang]
 
The group I have is a timestamp by each 15 minute (date / time format).

How do I create a formula using this timestamp when it is for each 15 mins, or do I create the formula based on the group total?


Thanks



Phil
 
DatePart("h", {your.date}) should do it. Build up the formula by stages, checking that each portion works before adding an outer layer. Then use it to group.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
[yinyang] Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top