Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Converting Number to Time Value Post Reply Post New Topic
Author Message
pellis
Newbie
Newbie


Joined: 09 Mar 2008
Online Status: Offline
Posts: 14
Quote pellis Replybullet Topic: Converting Number to Time Value
     Posted: 27 Aug 2008 at 1:11pm
Hello,
I'm working with a Cisco Call Center table and I am trying to determine the Average Speed to Answer (CallWaitTime/Calls Answered).  These fields are both given as a time value (00:06:36).  When I divide this by the number of calls (say 2 calls), the Cisco lists the SAS as 3:18.  I'm trying to pull data directly from the database and get results that match Cisco's.  When I take 00:06:36 and multiply 6 * 60(seconds)=360 +36=396 and divide that by 60 and get 6.6/2(number of calls)=3.3.   Cisco shows this in their report as 00:03:18.  I can't figure the formula for the ASA and converting numbers into a time value.  Any help will be greatly appreciated.
 
Thanks
 
Pellis
IP IP Logged
HolyCow
Newbie
Newbie
Avatar

Joined: 18 Sep 2008
Location: United States
Online Status: Offline
Posts: 15
Quote HolyCow Replybullet Posted: 19 Sep 2008 at 7:50am
Pellis, Don't know if you have this down already but use left string, right string, and mid string to get your absolute hours, minutes and seconds.  then Multiply your minutes by 36 and put it in a holding field (minutes1) and multiply your hours by 3600 and put it in a holding filed (hours1) and add your seconds, minutes1, and hours1 all together.  This should provide you with absolute number of seconds then divide by the count, giving you seconds per call.  Then you have to subtract the minutes and hours, leaving you with JUST the seconds which you can divide and get he number that you seek, then string it all back together.  Its ugly but it works.
IP IP Logged
jyensel
Newbie
Newbie
Avatar

Joined: 23 Sep 2008
Online Status: Offline
Posts: 5
Quote jyensel Replybullet Posted: 25 Sep 2008 at 3:41am
I use this to convert a time recorded in seconds in a database maybe it will help
 
IF {fld} > 0 THEN
        If Val (TOTEXT(TRUNCATE( {fld}3600),0)) <= 9  Then

                '0'+ TOTEXT(TRUNCATE( {fld}/3600),0)  + ":" +
                If  (Remainder ({fld}/3600) /3600 *60) <= 9 Then
                        '0' + ToText( Truncate(Remainder ({fld},3600) /3600 *60,0),0)   //converts decimal into minutes
                Else

                        If  Truncate( REMAINDER ( {fld},3600)/60,0) <= 9 Then
                                '0' + ToText( Truncate( Remainder ({fld},3600) /3600 *60,0),0)  //converts decimal into minutes
                        Else
                                TOTEXT( Truncate( REMAINDER ( {fld},3600)/60,0),0)       //converts decimal into minutes
        Else
                If  (Remainder ({fld},3600) /3600 *60) <= 9 Then
                        TOTEXT(TRUNCATE( {fld}/3600),0) + ":"  +   // changes seconds into hours
                        '0' + ToText( Truncate( Remainder ({fld},3600) /3600 *60,0),0)       //converts decimal into minutes
                Else
                        TOTEXT(TRUNCATE( {fld}/3600),0) + ":"  +   //changes seconds into hours
                        If  Truncate( REMAINDER ( {fld},3600)/60,0) <= 9 Then
                                '0' + ToText( Truncate( Remainder ({fld},3600) /3600 *60,0),0)  //converts decimal into minutes
                        Else
                                TOTEXT( Truncate( REMAINDER ( {fld},3600)/60,0),0)  //+'*' //converts  into minutes
ELSE
        "  :  "
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