Solved

Calculating multiple durations

Posted on 2011-03-20
10
335 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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