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

How to group per half hour instead of per hour? 1

Status
Not open for further replies.

DannyDutch

Instructor
Joined
Jun 20, 2006
Messages
6
Location
NL
Hi,

If you select a datetime field, you can group on this field. Crystal comes up with the option to group a datetime field by year, month, hour, etc.

We need to group the datetime field per HALF hour.

Is there anybody who can help us?

Thanx,
Danny
 
Create a formula:

if minute({table.datetime}) in 0 to 30 then
datetime(date({table.datetime}),time(hour({table.datetime}),0,0)) else
if minute({table.datetime}) in 31 to 59 then
datetime(date({table.datetime}),time(hour({table.datetime}),30,0)) else
datetime(0,0,0,0,0,0)

Then insert a group on this formula and set it to print for each minute. Since the minutes are converted to 30 minute intervals, only those will appear.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top