Create total time formula

1.     I have columns of time/date values in this format:  0:02:50  (meaning 2 minutes and 50 seconds).
        I would like to add theses values up, then find the average.
        So, if I have 10 time values, I need to get the total sum of the time and then divide by 10.
        How do I create a formula in Crystal Reports to do this?
2.     The above time values are part of a Group.  I plan to hide the details and show just the Group "average" (computed in Step 1)
        How/where do I place this in my report?
Thanks for your help.

hey C Warner,
1) create a new formula named Seconds (to place on the Details section) with syntax like
timevar t := {your time field};
numbervar s:=(hour(t)*3600) + (minute(t)*60) + second(t);
2) right click on the Seconds formula and choose Insert > Summary > Sum and also change the Summary Location to be your group
3) now right click on the Seconds formula again and choose Insert > Summary > Average and change the Summary Location to be your group
4) right click on the Summary and choose Format > go to the Common tab > Display String and enter this syntax which will change the output of the formula from seconds to a readable time display.
numbervar ts:= currentfieldvalue;
numbervar hs;
numbervar ms;
numbervar ss;
hs:= truncate((remainder(ts,86400))/3600);
ms:= truncate((remainder(ts,3600))/60);
ss:= truncate(remainder(ts,60));
stringvar display:= totext(hs,'00') + ":" + totext(ms,'00') + ":" + totext(ss,'00');
display
5) if you want you can also move this summary to the Group Header and then suppress the Group Footer.

Similar Messages

  • How to insert, as an input variable within formula, the total time window on scope?

    How to insert, as an input variable within formula, the total time window on scope (i.e. 20ms/div x 10 div = 200ms)?
    BELOW IS AN EXAMPLE OF ISSUE:
    FORMULA FOR ACTION INTEGRAL:
    STATISTICS:
    Input variable: DPO4034(CH1);
    Check Box: number of samples.
    FORMULA
    Input variable 0: DPO4034(CH1); alias: x0
    Input variable 1: "Total Time Window on Scope???"; alias: x1
    Input variable 2: Number of Samples (CH1); alias: x2
    Under Operation Setup: Formula
    Y= (x0^2)*(x1/x2)
    Output: Processed Data 1 (CH1)
    THEN USING STATISTICS:
    Input signal: Processed Data 1 (CH1)
    Check Box: SUM
    Output: CH1 Action Integral [A^2s]
    Solved!
    Go to Solution.

    Hi again Catherine,
    I have now added another TekScope (TDS3032B) along with the DPO4034 and run the same work-around on the TDS3032B using CH1 as the "real" signal channel and CH2 as the "burst width" channel. However, the value returned for CH2 is nominally 99E+36 (min 99E+36, max 99E+36) with very few retrievals of correct burst width (~200ms). Seems the SignalExpress program is unable to consistently retrieve from TDS3032B the actual burst width (scope's time scale/window) and defaults to 99E+36 value. Any ideas on what is occurring and how to make it work? Attached are some screen captures to help guide discussion.
    Regards,
    Michael
    Attachments:
    TDS3032B - incorrect burst width.png ‏301 KB
    TDS3032B - correct burst width.png ‏287 KB
    DPO4034 - always correct burst width.png ‏302 KB

  • Adding 2 Time formulas in Textboxes to get a total time

    I have been trying to add 2 time calculations together to get a total time rounded to the minute, but have been unsucessful.
    What I have right now in field "TimeIn1 and TimeOut1" is the calculation on click "$=Num2Time(Time())"
    I am tryingto make it so that the person using the form can click in the Time In boxes and have the time automatically entered. Then I want to add 4 fields together
    to get a total time spent on a project.
    The 4 fields are;
    TimeIn1
    TimeOut1
    TimeIn2
    TimeOut2
    Total Time
    I need it to do the equasion like this;
    (Timein1+(TimeOut1-TimeIn2)+TimeOut2)/60=TotalTime
    Can anyone help me.Is the easiest way to run the formula as a formcalc or Is a Java Script better.
    Please help this newbie.

    Here is a script that will do the task in Acrobat, you will have to change the field names and formats to match your form:
    // start time
    // Start time field name
    var cStartName = "StartTime";
    // Start time format:
    var cStartFormat = "HH:MM";
    // end time
    // end time field name
    var cEndName = "EndTime";
    // End time format:
    var cEndFormat = "HH:MM";
    // some conversion functions
    // function to convert time string to minutes
    function Time2Num(cTime, cFormat) {
    // convert time string to minutes
    // convert time string to date object
    var oDate = util.scand("mm/dd/yyyy " + cFormat, "01/01/1970 " + cTime);
    // convert date object to number of milliseconds
    var nTime = oDate.getTime();
    // convert milliseconds to minutes and return value
    return Math.round(nTime / (1000 * 60));
    } // end Time2Num function
    function Num2Time(nMinutes) {
    // convert time string to Hours and Minute
    // hours in nMinues
    var nHrs = Math.floor(nMinutes / 60);
    // remainder minutes from hours in nMinutes
    var nMins = nMinutes % 60;
    // return formatted time string
    return util.printf("%,101.0f" + ":" + "%,102.0f", nHrs, nMins);
    } // end Num2Time
    // end conversion functions
    // perform the calculation using the fields:
    // get the values of the fields
    var cStartTime = this.getField(cStartName).value;
    var cEndTime = this.getField(cEndName).value;
    // clear the value
    event.value = "";
    // test for not null time strings
    if(cStartTime != "" && cEndTime != "") {
    // compute the time difference in minutes
    nDiff = Time2Num(cEndTime, cEndFormat) - Time2Num(cStartTime, cStartFormat);
    event.value = Num2Time(nDiff);
    } //end not null values

  • How to display the time length of video (current time/ total time) ?

    Hi,everyone. I would like to ask how to display the time length of the video which show only in system example: it show the current time and total time? using AS 3.0.
    It there any information or solution to solve it? .
    I appreciate it any of you able to answer it. ^^
    Thank you.

    Hi,
    Actually I have this requirement for MAC OS 10.5. With the code you provided, I got the output as "6289375". When I changed the URL to point to my file (file:///Users/VPKVL/Desktop/MyRecord/tempAudio.wav), I am getting the below mentioned Exception:
    Exception in thread "main" javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
         at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:165)
         at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
         at TestWavLength.main(TestWavLength.java:13)The "tempAudio.wav" file is created by using java sound API. I am using the SSB USB Headphone Set to record the audio with the following settings for AudioFormat object:
    AudioFormat audioFormat = new AudioFormat(
              AudioFormat.Encoding.PCM_SIGNED, // the audio encoding
                                                            // technique
              48000.0F,// sampleRate the number of samples per second
              16, // sampleSizeInBits the number of bits in each sample
              2, // channels the number of channels (1 for mono, 2 for
                            // stereo, and so on)
              4, // frameSize the number of bytes in each frame
              48000.0F,// frameRate the number of frames per second
              false); // bigEndian indicates whether the data for a single
                            // sample is stored in big-endian byte order
                            // (false means little-endian)Can you please suggest where I am going wrong ?

  • I'm in need of a variable that I can use to display total time spent in a course.

    I'm attempting to create a custom certificate of completion that a learner can print at the end of a course.
    I'd like to have the total time spent in the course displayed on it but am not sure about the variable to use.

    Thanks for the quick reply!
    I was hoping for a quick solution to have the elapsed time appear only on a printable certificate of completion.
    Unfortunately, this goes beyond my limited knowledge and experience in using variables. (Admittedly, I'm not a frequent Captivate user)
    Thanks again!

  • Total result  & formula result  is wrong in query out put

    Hi BW gurus
    I have issue with total result and formula result
    my requirement
    Formula for hours is ( total time / Counter / 60)
    hours  column displaying
       14.2
         2.4
         3.4
    Total -
    5.6   not  20    then I setp calculate results to SUM  now total displying 20  perfect.
    Then I am using hours colum for calculation   here is my issue
    Qty rec per hour formula is = received / Hour
    Hours   Qty rec per hour          received
    14.2              100                            14200
    2..4               100                              2400
    3.4                100                              3400
    20                 300                              20000        result column for qty rec per hour is wrong . formula is not working on result for qty rec per hour
    Actually qty rec per hour result should be 20000/20  = 1000
    How to resolve this issue
    Thanks
    Rohan

    Hi BW Gurus,
    Thanks for your help .
    Let me explain my issue with examples :
    My report is by document date level ( Not at Po or PO line Level)
    I have a 3 Key figures
    1.  Hour -  is poulation at  PO Line level
    Ex :  4500001    1             5.30
                             2            5.30
                             3            5.30
    Then I am using counter to get single for time
    Hour/ Count  now my value is 5.30 in the report . hour column is perfect
    2. Po Qty  is fine
    3.  Qty Recd per hour ( Calculation)    PO QTy / Hour
    Now the issue is  each row caluculating perfect . but result row is not correct  Qty Received per hour . We don"t wont  sum of  Qty received per hour in result . We want  Caluclation result in the result
    Here is the issue
    If I have multiple POs for same document date  , each row is fine but system using division at Hour result also by COunter . because of thati am getting wrong hours in result for hour . this wrong result is using for Poqty receved per hour result  also .
    I put total for hour coulum result is perfect but for clauclation it is talking total hours/ total conter result .How to replace result caluculating by counter .This is our major issue .
    Appriciate your response
    Thanks
    Rohan

  • Is there a way I can have my form calculate a total time from beginning and ending time?

    Is there a way I can have my form calculate a total time from beginning and ending time?

    Sorry, but Formscentral doesn't support either a timer function or any kind of calculation. You might be able to do this if created your form in PDF. For help with PDF form creation in Acrobat I suggest you repost your question to the Acrobat Forum.
    Andrew

  • Calculating total time.

    I'm somewhat new to using spreadsheets. Basically I just want to keep track of the time I spend doing a particular job. So I'm tracking my start time, end time, and then I want to calculate the total time spent. Thanks.

    Yes, I thought about that. But if you start at say
    9pm and end at 2am you would get the incorrect result
    of 7 hours. I think I have to convert the time to
    something else before the math takes place. But I'm
    not sure how that would work.
    I'm not sure how you managed to subtract 9pm from 2pm and get 7 hours. When I try 2am - 9pm, I get #VALUE!, as AppleWorks reads both 'times' as text, and cannot use Text values in a formula that requires numbers. AppleWorks is a bit fussy on what it considers to be a number.
    Using the default alignment, you can recognize what AppleWorks thinks is a number—it will be aligned to the right of the cell—and what AW considers to be Text—it will be aligned to the left of the cell. In the case of Time, you're better off using the 24 hour clock, and entering one minute betore 2pm as 13:59.
    The Mac clock's unit of time is the (24 hour) Day, and all times entered are regarded as the portion of one day that has elapsed up to that time. When you do the subtraction, the result is also a time of day. For start and end times within the same calendar day, simply doing the subtraction will give a result that can be read as the (correct) elapsed time. For the example times you gave, the 'correct' result is also visible:
    02:00 - 21:00 = 05:00
    But the actual numbers behind that 05:00 result and the two times used to get it are the portion of the current day that has passed up to each of the times entered, and the difference obtained when you do the subtraction:
    0.0833 - 0.8750 = -0.7917
    If you only want the (readable) result for a single day, that's not a problem. But if you want to add the results to get a total time for a week, you need to (make AppleWorks) do some additional math. In simplest terms, you need to add 1 to the end time if the end time is on the calendar day after the start time. There's an explanation of this below, which you should read for a better understanding of Time and the Mac, but which isn't necessary to use the formula.
    The formula assumes your start time is in column B, your end time in column C, your formula reporting time worked is in column D, and that you will enter times in rows 2..6, and calculate the week's sum in D7
    Enter in D2, and fill down to D6: =IF(C2,C2-B2+(C2<B2),"")
    Format these cells to display as Time.
    Enter in D7: =24(SUM(D2..D6)) —to report the result in hours (eg. 25.678)
    Format the cell to display as Number, General.
    or
    Enter in D7: =INT(24(SUM(D2..D6))&":"MINUTE(SUM(D2..D6)) —to report the result as hours and minutes
    Note that the second option for D7 produces a text string which will not be useable in further calculations.
    This is Text, so no Number formatting is necessary.
    Regards,
    Barry
    Time and the Mac
    The Mac clock tracks time in Days and Fractions of a Day, starting at midnight, January 1, 1904.
    Nine PM today, May 8, 2006, represented as a decimal number, is 37383.875. Two AM tomorrow, May 9, 2006, is 37384.0833333333.
    An AppleWorks spreadsheet cell (or database field) formatted to display as Time will ignore the whole number part of those numbers, and interpret the decimal fraction part as Time of Day, and display the result in the Time format you have chosen for the cell.
    A cell (or field) formatted to display as a Date will ignore the fractional part of the number, and display the whole number part in the Date format you have chosen.
    When you enter a time, the result is the time of day on January 1, 1904. When calculating elapsed times where start and end times cross the midnight boundary, you need to add 1 (day) to the result to compensate for the change in day and get a result that can be used in further calculations. That's what the "+(C2<B2)" part of the first formula above does—adds 1 if "(C2<B2)" is TRUE or adds 0 it it's false.
    If you add times, the result is 'correct', but if the total reaches 24 hours, the displayed result will appear incorrect as a Time formatted cell ignores the whole number part of the actual result (eg. 27 hours, or 1.25 days), will display as 03:00, the same as 3 hours, or 0.25 days. You can convert the result to hours and fractions of hours by simply multiplying the result by 24, and displaying it as a Number rather than as Time.
    B

  • Grand Total on Formula

    I have a quantity field in my main report that I passed off to my subreport. In the subreport I took the quantity field and placed it in a formula ({@Valuation Material Costs}*{@Qty from Main Report}). This is placed in the Group Header. Now I want to setup a grand total of this formula but I can not figure out how to get there. Any ideas?

    If your formula already contains any summarized fields then you cannot summarize that formula. Try creating a mannual running total like this
    whileprintingrecords;
    numbervar i;
    i:=i+@formula;
    Now place this formula in group footer or header and suppress this formula. Create a new formula like
    whileprintingrecords;
    numbervar i;
    Place this in report footer which shows the grand total.
    Reagrds,
    Raghavendra

  • Running Total Grouping Formula

    I have a running total condition that I need to summarize the field CAWP.BAC. I would typicaly evaluate this total for change of group 4 and reset on change of group 3. I need to condition the evaluation for ".900" in {CAWP.WP} but i also need to evaluate for change of group 4. Does any one have any examples of a formula for evaluation "on change of group"?

    Hi John,
        For this you can try using manual running total formula's.
    1) Create a @reset formula as below and place it in group header 3.
        Formula :
        Whileprintingrecords;
        Numbervar i:=0;
    2) Create an @evaluation formula and place it in detail section.
       Formula:
       whileprintingrecords;
       numbervar i;
       if {CAWP.WP} = ".900" then
          i:= i+ {CAWP.BAC}
    3) Create a @display formula and place it in group footer 4.
        Formula:
        whileprintingrecords;
        numbervar i;
    Hope this will help!!
    Regards,
    Vinay

  • How to create a time counter

    Hello expertsl,
    I have a new challenge on board.
    I have a form that is automatically popped up. Now on the form, i need to insert a timer that as soon as it pops out, the timer starts and then i have to enter some data in the form and as soon as i press the save button, the timer records the time count and then stores it in a table.
    Any suggestion are the most welcome...
    Thank you

    As Hoek said, this is not a Forms forum.
    However, the problem is not really unique to Forms and a timer itself is not needed.
    A timer is a kernel object that fires at specific intervals and each time around executes a callback routine. This allows one to update or process at specific intervals.
    You do not need a timer as you are interested in time elapsed - which means that on the creation of the form you need to get the current time. When the save button is clicked you again get the current time. The data that you are interested in is the time difference between these two.
    Remember that timers are expensive objects to create ito kernel resources. Some operating systems limit the total number of timers that can be created. In general, it is not a good idea to create a timer unless it is the best technical solution for the problem. And you do not need a timer determine a time elapse. You simply need code in the constructor of the form and code in the save events of the form. Nothing more.

  • Print time formula error when used in cross-tab

    I have a cross-table that I'm using to calculate revenue, which is based on a conditional formula.  Within that formula is a Running Total field.  When I use this field I get the following error message: "A PRINT TIME FORMULA THAT MODIFIES VARIABLES IS USED IN A CHART OR MAP".
    My problem is that I am using the Running Total because the values are duplicated by the number of detail lines.  I think this should be a relatively easy fix, but I am stumped. 
    Thank you,
    Any help you can provide is greatly appreciated!!!
    Marlene
    Crystal Reports Professional, 11.5.8.826 (on Progress Server)

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with your directly

  • How to Summarized Running Total and Formula ????

    Post Author: ryan_r
    CA Forum: Crystal Reports
    Hi my name is Ryan, I want to ask something. I have build a report
    that contains Running totals and Formula. What I want to do is I want
    to use subtotal and Summary field for the running total and Formula,
    but I can find the field when I click the dropdownlist in the Subtotal
    dialog box or summary field for the running total and the formula. Is
    there any way that I can use subtotal or summary field for Running
    Totals and formula, I do need some help guys, Thanks. FYI: I use Visual Studio.NET 2003; ASP.NET(C#).regards

    Post Author: ryan_r
    CA Forum: Crystal Reports
    Hi kcheeb, thanks for your advice but it doesn't work sorry. By the way maybe I can explain you more of twisted situation.I have updated my report,
    so im not using runningtotals any more, I'm using summary field and
    formula which are;-the summary field is "Sum of SuspenseVoucher.Realisation" located in Group Footer #3: SuspenseMstr.ProgramID-The formula is "@Balance_Formula" which contain:{SuspenseMstr.Budget}
    - Sum ({SuspenseVoucher.PenggunaanBudget}, {SuspenseMstr.ProgramID})
    also located in the same location as summary field above.FYI: I have three group records which are:-Group #1 : SuspenseMstr.APDate (Appearing in months e.g January 2007)-Group
    #2 : programCategoryMstr.programCategoryID (doesn't have any objects I
    just put some dashed line, the group is only for proper sorting)-Group #3: SuspenseMstr.ProgramIDwhat I want to do is:-in the Group Footer #3, I already put "Sum of SuspenseVoucher.Realisation" and "@Balance_formula"-in
    the Group Footer #2, I want to put Summary of Budget but there's a
    problem in here too, in the budget field there are some data are
    conditionally suppressed. I already tried to put some summary field but
    the summary operation wasn't like what I wanted. What I wanted was the
    sum only evaluate the data that appeared in the report not the
    suppressed, but in the summary the suppressed data keep evaluated. And
    in this location I also want to put Summary of "Sum of
    SuspenseVoucher.Realisation" and the Sum of the @Balance_formula.-
    in the Group Footer #1, I want to add some Summary of "Sum of Budget"
    (which I already explained that this operation has a problem) and I
    also want to put the Sum of "Summary of Sum of
    SuspenseVoucher.Realisation" and the Sum of "Sum of @Balance_formula"-And in the Report Footer I want to add some Grand Total from all of the evaluation above.So
    there are my problems, quite much I would say. I hope this explanation
    helping all of you guys to solve my problem, thanks for spending your
    valuable time for me. This matter is really important for me 'cause I
    want to learn something new from all of you experts as I'm still a
    "toddler" in this situation and also because I work in this field, so a
    BIG thank you for all of you guys out there. Best Regards.

  • Scrubber bar displays only fraction of total time

    So, I recently decided to add some Ricky Gervais radio recordings to my iPhone's library as podcasts. I downloaded these around 4-5 years ago and at the time used my zune (I know, I know -.-) to play them. So I after I sync them to my iPhone and try to play them, I notice that the scrubbing bar on top is displaying a ridiculously short total time for the podcast. I sort of shrugged it off because I was at work and couldn't do much about it at the time. Now mind you, these recordings last anywhere from 40 minutes to an hour. The time displayed ranges from 2-4 minutes. This wouldn't really be an issue, but it does not allow me to pause or rewind after it reaches the shorter time displayed. The podcast will continue playing if left alone, but once you hit pause or try to fast forward or rewind it will revert back to the end of the 2-4 minutes. This gets to be a pain because then I have to fast forward through the use of the playback speed button in order to reach the place I was at. These files are all .mp3s. I did add them manually to my iTunes library and then change their media type to podcast. The podcasts display regular time when playing on my desktop's iTunes. I recently noticed that the correct time displays for a fraction of a second when I begin to play one, but then switches itself to the shorter time (using the scrubbing bar during the time that it flashes the correct time does nothing as it just starts playing at the end of the shorter time displayed). I'm pretty sure this problem is something I have done on my end, but I'm not sure what that might be. I'm willing to try anything out just to fix this issue.

    Yep. That did it. I had iTunes create an apple lossless version of one podcast just to test it out and when I synced it the scrubber bar displayed the correct total time for the lossless version. I'll have to make a day of fixing up my old podcasts in batches. Thanks for the help though, this was driving me batty!

  • Display playlist total time on iPhone

    Anyone know if this is possible?  I know I can see within the desktop iTunes. But when I create a playlist on the phone, I can't see the total time of a playlist.
    I rarely sync with iTunes on my PC. I do everything on the phone.
    Thanks in advance.
    Jason.

    maybe, i'm missing something - as soon as i installed itunes 11 i turned the status bar back on, because i really like having it.  but as the original commentor said, in the past you could click on the info in the status bar and it would flip from "x songs, x hours, x mb" to "x minutes" or "x days" or whatever else (i forget how many variations there were).  now it shows up with "x songs, x hours, x mb" and - like the original poster - i can find no way to change that view.  as they also said, this is very annoying when you are trying to determine if a playlist can be burned onto a single cd or not.  or any other time you are trying to plan something that is over an hour long but needs to be an exact number of minutes. "1.3 hours" or "1.4 hours" is pretty worthless when minutes count.  i google searched for awhile and have so far found no answer.  if it were the early 80's and i was making a mix tape by hand it wouldn't seem too odd to have to add up all the song lengths by hand (or on a calculator).  these days it's kind of ludicrous - especially since the functionality used to be there.  (maybe apple figures no one should want to burn cds these days...they have been removing cd/dvd devices from their hardware.  but there are other legit reasons for wanting to know the exact length of a playlist.)

Maybe you are looking for

  • Single bank account in segmented CoA database.

    Hi all My database is managed with segmented chart of accounts. i am at initial stage of master importing of CoA. According to business we have 9 units but banks are located only at head office means only at one unit.  All transactions of banking are

  • In my aperture the camera file name does not show under the photo how do I get it to show

    In my aperature dislay the camera file number does not show how do I get it to show

  • How to install IKEA Home Planner tool on Firefox?

    I was able to use the IKEA Home Planner tool on Firefox before with 4.0.1. I re-installed the software because of tab issues and now I cannot install the IKEA Home Planner. I do not have any adblock or anything blocking the software. It usually uses

  • Oracle VM server RAM question

    I am running two vm servers both with 16GB of physical memory installed. When I go in to check the memory specs for the servers using "free -m" or "cat /proc/meminfo" it only show a total of 577MB of RAM. Now I know this can not be true because curre

  • Question about sequence table

    hello when i set up the sequence table within the mapping work bench,i DON'T select write it to database,i wonder if i need to generate the class code for the sequence table,and put it in my project source files package with all of the other table cl