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

Dorting Crystal report Times

Status
Not open for further replies.

grierfield

Technical User
Dec 18, 2002
55
US
Example, I have a database that save time of occurances in the following way

11:20:00PM
8:20:00PM
9:20:00PM
8:20:00AM
8:10:00AM
12:20:00PM

I want to group these by AM and PM, how do I go about it?
 
Try creating a formula to distinguish the AMs from the PMs. Then, group on the formula:
[tt]
//@AmOrPm
If CTime({Table.Field}) < Time(12,00,00) Then
'AM'
Else
'PM'
[/tt]
This is version dependent (CTime function didn't exist until ver 8). Always a good idea to post your Crystal version at minimum. Other helpful info:
Database/Connectivity
Sample Data (which you supplied, but what's the datatype?)
Expected output

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top