Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: pull time out of field with date/time Post Reply Post New Topic
Author Message
lorimack
Groupie
Groupie


Joined: 03 Nov 2009
Online Status: Offline
Posts: 48
Quote lorimack Replybullet Topic: pull time out of field with date/time
     Posted: 06 Mar 2013 at 9:54am
Hi,
 
I have a field that includes the date and time.  I would like to remove the date from this field, i know how to show only time, and group by time.
 
for instance, im trying to find peak call times, my groups are looking like this
 
1/1/11  0100
1/1/11  1400
1/1/11 2300
1/2/11  0100
1/2/11  2200
1/2/11  2300
 
i would like to show an output like this
 
0100  - 2
1400 - 1
2200 - 1
2300 -2 
 
any ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Mar 2013 at 10:03am
this looks like a text field.
You can strip out the last 4 characters group and then then do a count on the group
right(field,4)
IP IP Logged
lorimack
Groupie
Groupie


Joined: 03 Nov 2009
Online Status: Offline
Posts: 48
Quote lorimack Replybullet Posted: 06 Mar 2013 at 10:27am
not quite sure how to do that, can you explain?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Mar 2013 at 10:35am
use a formula to get the last 4 characters from teh field
//timeonly
right(table.field,4)
 
group on this formula field
insert a count of the datetime field at the group footer


Edited by DBlank - 06 Mar 2013 at 10:35am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum