Solved

Calculating multiple durations

Posted on 2011-03-20
10
316 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
 

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now