Efficient Date Calculation between multiple date r

Results 1 to 2 of 2

Thread: Efficient Date Calculation between multiple date r

  1. #1
    Join Date
    Dec 1969

    Default Efficient Date Calculation between multiple date r

    I&#039;m building a helpdesk application, and trying to figure the most efficient way of handling multiple dates. <BR><BR>This is a basic scenario:<BR>Issue is escalated to the helpdesk, Date for Assigned is Set<BR><BR>Helpdesk rep contacts a customer, capturing hardware. The issue is set to a Pending Status, and a Pending Date is set<BR><BR>Rep recieves hardware, closed pending date is set<BR><BR>Issue cannot be resolved by helpdesk, sent to an engineering department. Date sent to Engineering is set<BR><BR>Issue is returned from Engineering with Analysis and solution. Date returned from engineering is set<BR><BR>Issue is closed, closed date is set.<BR><BR>Basically, what I need is an efficient way to do this:<BR><BR>Time-to-Closed<BR>(Date Closed - Date Opened) - ((Date from Eng - Date to Eng) - (Date from Pending - Date to Pending))<BR><BR>I figure I can do this by date calculation, but where I get stuck at is how would I make this so it will handle multiple status changes (being sent back and forth to engineering, for example)

  2. #2
    Join Date
    Dec 1969

    Default If you use default values...

    ...for all the pairs, such that the defaults are the same, then the difference in a pair will be zero.<BR><BR>Example: By default, make DateFromEng and DateToEng both 1/1/1900<BR><BR>The diff is obviously zero, so that doesn&#039;t affect the calculations. Yet the dummy date of 1/1/1900 serves as a flag to you that it has never been sent to engineering just as well as a NULL value would.<BR><BR>So no need for IFs. And the time to actually do the subtractions and get zero result will be minimal.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts