Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Time Field Issue Post Reply Post New Topic
Author Message
crystalsonic
Groupie
Groupie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 46
Quote crystalsonic Replybullet Topic: Time Field Issue
     Posted: 12 Feb 2013 at 5:18am
I am working on a turn around time report and this calculation works fine as long as the Date/Time data  is stored as a Date/Time field (separate fields):
 
DateDiff ("s",DateTimeValue ({Episodes.DateColl},{Episodes.TimeColl} ),
DateTimeValue ({Episodes.ReportDate},{Episodes.ReportTime} ))/60/60
 
The output is reported in hours.
 
The Time Collected field does not store the time in the 00:00 AM/PM format. This time is stored as text since there are instances when the time is not known and the default is 0000 (4 zeros). The TimeColl field is 4 character string in Military time.
 
I need to come up with a formula that converts the TimeColl into a field that is compatible with the formula. Is there any way to do this? or should I go about it a different way?
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Feb 2013 at 9:43am
one way to try is
 
time(picture({Episodes.TimeColl},"xx:xx"))
IP IP Logged
crystalsonic
Groupie
Groupie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 46
Quote crystalsonic Replybullet Posted: 12 Feb 2013 at 11:05am
That worked great! Thanks! Smile
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