Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Calculating multiple durations

Posted on 2011-03-20
10
343 Views
Last Modified: 2012-05-11
I have a previous solution (Question) that needs some further fine tuning. Current data is sorted under room numbers and may have more than one transaction within a day or after registration. : Please see Image or Report data included. The issue I'm currently running into is if there is more than one transaction I only calculate the duration from the last transaction which would be less revenue than if I use the Total duration while someone is actually present.


 Example Transactions PARC-Report-.pdf PARC-Report-.rpt parc.txt
0
Comment
Question by:John-S Pretorius
  • 4
  • 4
10 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 35186165
What duration do you want to calculate?

WHat constitutes the start and end of the duration cycle?

What about multiple entries and exits in a day?

Are you only counting time when the car was in the lot?

mlmcc
0
 

Author Comment

by:John-S Pretorius
ID: 35186256
I'm trying to calculate only the duration when the vehicle is parked inside the garage.

Single entries I'm not worried about, multiple entries causes wrong totals as currently I'm using the last transaction.

Typically if someone is parked for longer than a day I use midnight and end of day but if the user is parked from registration that becomes the starting point.

I'm really only interested in up to7 hrs as that would-be the max day rate that can be charged, I'm trying to be more accurate with the duration as should some only have a last entry of an hour I currently will calculating $2, which is wrong if he had multiple transactions see example.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35190203
So an in at 9PM get 3 hour charge for the day since it didn't leave

WHen he leaves at 9AM he gets a 9hr charge on the next day. Any concern about overcharge since the total duration was over 7 hours?

In 3pm, out 6pm, in 10pm 5 hours

mlmcc
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:John-S Pretorius
ID: 35190337
For single transaction I have it doing exactly that : in at 9pm will calculate his duration as 3Hrs parked until midnight and should he leave at 9am he was parked for 9 Hrs. (This is the easy part for single transactions) - I also have to look out for single day transaction that actually registered on the same day vs the previous day if it's on the same dat duration would be from registration but if it's from a previous day it its from midnight.

I am more interested in the total duration if the count (of that groups > 1) so if there was 5 transactions (IN, OUTIN, OUT...) up to 7 hours, after 7 Hrs I don't care because that will be the max rate. I am trying to be more accurate in the duration captured for users actually parked inside. for a day.

I am currently also working on another question exporting each days report to SQL so that I can then later create a accumilative report that will tell me the charges for each user for previous days is he was been parked on the prvious day.

Unfortuanatly I can only use RAW data / day and cannot get this previous day day from the original database due to 'something weird' which I'm not sure will be rectified hence the work-around.
0
 

Author Comment

by:John-S Pretorius
ID: 35449191
I still have no solution
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 36242083
Are you still looking for a solution?

mlmcc
0
 

Accepted Solution

by:
John-S Pretorius earned 0 total points
ID: 36242095
Completed a solution by grouping differently,
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 36275174
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Change start of Week from Sunday to Friday 8 54
sort by a cross tab in crystal report 2 53
Formatting a Crystal Report 2 68
Parameter Values   Crystal Rep. XI release 2 6 24
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question