Time Comparison and Subtracting

I have a requirement regarding time like i need to compare two time datatype fields, like Start time and End time, End time should not be greater than Start Time. Also Lunch break field will be entered in mins. So, now I need to display in a field Working = Start-End-Lunch. How can I subtract Time from Time and also Compare in Webdynpro Java

Its more w.r.t. plain old Java.
Look up in Java to use the Date/Time classes to subtract the times.
Check this link for some clue into time subtraction in Java.
http://www.mkyong.com/java/how-to-calculate-date-time-difference-in-java/
Regards,
Sharath

Similar Messages

  • Time Comparison and Calculation Questions

    Friends-
    I work in an industry where my scheduled work time is limited by statute.  And I have to do calculations for work legality that are based by looking back at actual times and forward at scheduled times.  The "DURATION" format is amazing because I can enter 5H 47M and it appears as I require.  I can also easily add with SUM my required times.  But that is the easy part.
    The hard part is it appears that while I can add and subtract DURATION formats, it is not a number, but a string.  (I think).  The problems I have are:
    1.  I need to populate a column for calculations (Calc Column) which includes either my Scheduled Time or Actual Time.  I need to look backward on actual times (regardless of which is greater or less) and forward on scheduled times.  I put that value in the Calc Column and do running totals for 28 days at at time.
    An IF statement would work perfectly here, if these were numbers, but unfortunately 0H 0M does not equal zero and I have been unable to make any If formula that states =IF(A1=0, X, X)   or   =IF(A1=0H 0M, X, X)   or   =IF(A1="0H 0M", X, X).    The only way I can test to see if a value is zero is with a string operator to look at 0H 0m and see zero's    =IF(MID(F44,4,1)+MID(F44,1,1)=0,E44,F44)
    Can anyone think of a more elegant way to test for whether a column contains 0H 0M.
    2.  I have to enter 0H 0M because I can't get any formulas to work on a blank cell.  I would much prefer to not see 0H 0M in the column and only see values on the days that I work.  But I have not been able to leave blank.  As you can see the only formula that works requires 0H 0M and not zero or empty.
    3.  Conditional formating:  I have tried to conditional format so that any time the value of a cell exceeds 95 hours it turns red.  But formatting works on values, and not on my 0H 0M string.
    Suggestions or solutions appreciated:

    Ian:
    Thanks, it almost worked perfectly, but not quite... 
    DUR2HOURS solve the biggest problem that I had.  Unlike in you sheet I do not calculate on a start and ending time.  I start with a scheduled time for the day, then a computer provides me an actual time for the day.  So Column E is Scheduled, Column F is Actual.
    DUR2HOURS allows the if statement you see below, namely to see if ACTUAL column is zero, it returns result of Scheduled.  Thank you, very nice solution and allows IF statement.
    Small issue still left, I would like to leave the says that I do not work displaying blank.  Currently I have to enter 0H 0M every day or else the dreaded little red triangle below.  So if I could make a formula that did not return the triangle the spreadsheet would read nicer and I could move onto the lookup function that is also not working!
    Thanks again for the excellent recommendation.
    JG

  • How to implement boolean comparison and event structure?

    Hello all,
    I'm currently developing an undergraduate lab in which a laptop sends out a voltage via USB-6008 to a circuit board with an op-amp, the voltage is amplified, and then sent back into the laptop. The student is going to have to determine an "unknown" voltage which will run in the background (they can do this by a step test, graph V_in vs V_out and extrapolate to the x-axis).
    Currently, I have two loops that are independent in my VI. The first loop is used to "Set the zero." When 0 voltage (V_in) is sent out of the laptop it returns a value around -1.40V (V_out) typically. Thus, I created the first loop to average this value. The second loop, averages the V_out values that come into the laptop as the V_in numeric control changes. Then I take the "set zero" value from the first loop and subtract it from the second loop average to get as close to 0V for V_out when V_in is 0V.
    The problem I'm facing is, the event structure waits for the V_in numeric control value change, but after "SET ZERO" is pressed, if there is an unknown value, it will not be added to the average for V_out until V_in is changed by the user. So, I tried implementing a comparison algorithm in the "[0] Timeout Case." This algorithm works for step tests with positive values for V_in, but there are two problems.
    1) Negative values cannot be used for V_in
    2) If a user uses increasing positive values for V_in there is no trouble, but if they try to go back to 0, the value change event has been called and it is added to V_out as well as the timeout case.
    Sorry for the extremely long post, but I've been banging my head over this and can't figure out how to properly implement this. I'm using LabVIEW 8.0.
    Attachments:
    Average Reset Test.vi ‏371 KB

    OK you have bigger problems than Raven's Fan is pointing out.
    When the first event loop stops ( after pressing "") (the boolean text is "Set Zero")  The second loop may start- (AND PROCESSES all of the events it was registered to process before the loop started!)  that would enclude the value change event from "" (The boolean text is Stop) Being pressed bebore the loop started.  Of course, since the labels of "Set Zero" and Stop are identical nulls....................................................BOTH event trigger at the same time and are processed as soon as the event loop they are registerd to is available.
    Get it ... The two buttons labeled "" both queue Value change events to both loops registered to act on the value change of the control labled ""!
    Both loops will do what you programmed in the case of "" Value Change!  This can, (as you have observered) lead to confusing code actions.
    Do avoid controls with duplicate labels (There is a VI Analizer test for that!)  Do avoid multiple event structures in the same hierarchy. 
    DO NOT bring this to your studients to help you learn LabVIEW!  We get enough studii asking embarassing questions
    VI Analizer will help you provide sound templates.  If you need help with that hit my sig line- e-mail me and I'll always be willing to help.
    Jeff

  • In Table contol,add and subtract button getting disabled.

    Hi ,
    My requirement is that in table control when user adds  more than four rows,error message will be displayed i.e maximum of 4 rows allowed.
    But after error message is displayed ,add and subtract button is disabled in table control and I am  not able to remove the rows.
    Any solution available on making add and subtract button active.
    Regards
    Nikhil

    Hi
    In PBO,
    module status_100.
    looop at itab with control tc.
    endloop.
    in program
    module status_100.
    describe table itab lines tc-lines.
    if tc-lines = 0.
    tc-lines = 4.
    elseif tc-lines > 1.
    tc-lines = 4.
    endif.
    endmodule.
    here there is no way you will get more than 4 rows at any time.
    instead of Error message you can give warning or information message. this will not disable your buttons.
    Cheerz
    Ram

  • Peel off hourly output value and subtract from previous hours (then write to file)

    Here is another problem I have been working with and what I have tried so far.  Right now, my current VI is writing data to an excel file at a point every second.  I would LIKE peel off a point from this datastream once every hour and subtract it from the previous hour's value and write an hourly value to an excel file (same file or different file is ok).  I was working with a guy here at my university who had some ideas to use the Elapsed time function.  I have included a screenshot of the part of the VI containing the function we were working on.  We never could get it to work quite right.  We were having some problems getting the shift registers to work (used to subtract the current hour's value from the previous hour's value).  Let me know if you have any ideas, if maybe we are on a good pathy, or maybe I should try something altogether different.  I'm just looking for a simple solution at this point.
    Thanks,
    Jeremy
    The local variable "Total Consumption" is the data stream off of the hourly values are being taken.  Currently (not shown in this screen shot), the value of "Total Consumption" is combined with the other channels into one signal that is fed into the "Write to Measurement File" VI (shown at the right).

    You have a true constant wired to your stop button for the loop, which means the loop will only run once.
    You may want to consider the positions of the previous and current indicators inside that loop.  It's not clear how you want them to function.  The previous indicator doesn't get updated until right as the elapsed time occurs.  The case structure gets executed, and you will immediately have a new previous value calculated, but you won't see that again until the end of the next hour.  Not sure if you are updating the current value in the false case as well.  Otherwise that would look like stale data for an hour.  If you are updating it in the other case, than you should move the local variable and the indicator completely out of the case structure and only pass in the wire to the subtraction function.

  • Data comparisons and movements

    I have a Heap Sort using the following code, and I cannot seem to figure out how many data comparisons and data movements there are as the heap is sorted. Does anybody know how to count the number of comparisons and movements?? Please let me know....much appreciated...Thanks :)
    import java.io.IOException;
    import java.util.*; // Calender Class for timing
    public class Heap {
    private MyNode[] heapArray;
    private int maxSize;
    private int currentSize; // number of items in array
    public Heap(int mx) {
    maxSize = mx;
    currentSize = 0;
    heapArray = new MyNode[maxSize];
    public MyNode remove()
    MyNode root = heapArray[0];
    heapArray[0] = heapArray[--currentSize];
    trickleDown(0);
    return root;
    public void trickleDown(int index) {
    int largerChild;
    MyNode top = heapArray[index];
    while (index < currentSize / 2)
    int leftChild = 2 * index + 1;
    int rightChild = leftChild + 1;
    // find larger child
    if (rightChild < currentSize
    heapArray[leftChild].getKey() < heapArray[rightChild]
    .getKey())
    largerChild = rightChild;
    else
    largerChild = leftChild;
    if (top.getKey() >= heapArray[largerChild].getKey())
    break;
    heapArray[index] = heapArray[largerChild];
    index = largerChild;
    heapArray[index] = top;
    public void displayHeap() {
    int nBlanks = 32;
    int itemsPerRow = 1;
    int column = 0;
    int currentIndex = 0;
    while (currentSize > 0)
    if (column == 0)
    for (int k = 0; k < nBlanks; k++)
    System.out.print(' ');
    System.out.print(heapArray[currentIndex].getKey());
    if (++currentIndex == currentSize) // done?
    break;
    if (++column == itemsPerRow) // end of row?
    nBlanks /= 2;
    itemsPerRow *= 2;
    column = 0;
    System.out.println();
    else
    for (int k = 0; k < nBlanks * 2 - 2; k++)
    System.out.print(' '); // interim blanks
    public void displayArray() {
    for (int j = 0; j < maxSize; j++)
    System.out.print(heapArray[j].getKey() + " ");
    System.out.println("");
    public void insertAt(int index, MyNode newNode) {
    heapArray[index] = newNode;
    public void incrementSize() {
    currentSize++;
    public static void main(String[] args) throws IOException {
    int size, i;
    size = 500;
    Heap theHeap = new Heap(size);
    for (i = 0; i < size; i++) {
    int random = (int) (java.lang.Math.random() * 5000);
    MyNode newNode = new MyNode(random);
    theHeap.insertAt(i, newNode);
    theHeap.incrementSize();
    System.out.println(size+" random numbers are currently being generated...");
    for (i = size / 2 - 1; i >= 0; i--)
    theHeap.trickleDown(i); // creates the heap
    System.out.print("\nRandom Numbers in a Heap: ");
    theHeap.displayArray(); // prints the heap
    long time1000start = new Date().getTime() ; // this makes a new Date object and then sets the long integer value of the Date object
    // ******************* START - sorting numbers *******************
    for (i = size - 1; i >= 0; i--)
    MyNode biggestNode = theHeap.remove();
    theHeap.insertAt(i, biggestNode);
    // ******************* END - sorting numbers *******************
    long time1000end = new Date().getTime() ; // this makes a new Date object and then sets the long integer value of the Date object
    double timediff1000m = (time1000end - time1000start); // difference of time in milliseconds
    double timediff1000s = ((time1000end - time1000start) / 1000); // difference of time in seconds
    System.out.print("\nRandom Numbers in a Sort: ");
    theHeap.displayArray(); // prints the numbers in increasing order
    System.out.print("\nStart Time of Sort: "+time1000start);
    System.out.print("\nEnd Time of Sort: "+time1000end);
    System.out.print("\nTime to Complete Sort: "+timediff1000m+" milliseconds or "+timediff1000s+" seconds.");
    } // end main method
    } // END project :)

    I never miss class....my instructor gave us the assignment of making a heap sort and he told us to use code off the internet as a resource because the only sorting we have done so far is bubble.....this was a research project, for my instructor to see if we can use the internet as an effective resource to put together a program and learn about a differnet type of sorting.....everyone in the class got a different type of sort (merge, quick, insertion, etc...). i have put the program together and customized it to my needs based on my knowledge.....the last thing i am having trouble with is my counting of comparisons and data movements. Can you please help me finish up my program.

  • NSDate, NSTimeInterval, Calculating time passed and Core Data

    I'm creating a timesheet/stopwatch application of sorts for the iPhone.
    I am using an NSDate in CoreData and following this pattern:
    1) Start:
    Session* session = (Session*)\[NSEntityDescription insertNewObjectForEntityForName:@"Session" inManagedObjectContext:managedObjectContext_\];
    session.startTime = \[NSDate date\];
    2) Calculate time passed and update label:
    NSTimeInterval timeDiff = -1*\[session.startTime timeIntervalSinceNow\];
    cell.textLabel.text = \[NSString stringWithFormat:@"%f", timeDiff\];
    I also see that I could use:
    NSTimeInterval timeDiff = \[\[NSDate date\] timeIntervalSinceDate:session.startTime\];
    cell.textLabel.text = \[NSString stringWithFormat:@"%f", timeDiff\];
    I don't like this since it is needlessly creating a lot of dates - and there could be 100s of these timers running at the same time ... or, does timeIntervalSinceNow possibly also create a new date evertime under the covers and I'm pre-optimizing or something too early. Can anyone suggest a better way to do this? For instance, initially, I was simply using NSTimeInterval:
    NSTimeInterval startTime = \[NSDate timeIntervalSinceReferenceDate\];
    NSTimeInterval endTime = \[NSDate timeIntervalSinceReferenceDate\] - startTime;
    But I end up struggling with the best way to manage this as part of a CoreData entity. Should I uses a double? or a Date? I understand that a Date is implemented as an NSTimeInterval but I can't assign or subtract an NSTimeInterval directly to my entity.date
    session.startTime = \[NSDate timeIntervalSinceReferenceDate\];
    NSTimeInterval timeDiff = \[NSDate timeIntervalSinceReferenceDate\] - session.startTime;
    Obviously, this won't compile when startTime is a Date object but I think it illustrates what I'm after. Trying to 'lightly' calculate time passed by using the start time assigned to an Entity. Maybe the original way is just fine. I'm just looking for suggestions. I guess I could try running this inside a profiler. As a side note, is there a better way to print the stopwatch output to the screen? It seems like overkill to constantly update a Label's text property ... hundreds, maybe thousands of times especially when there may be 10 or so timers running on the same screen. Does anyone have any advice for stopwatch type 'update the time' label behavior?
    I'm doing this in an NSTimer potentially set to fire every .01s ... IE: this method will get hit quite a bit ...
    Thanks.
    Message was edited by: LutherBaker

    LutherBaker wrote:
    I don't like this since it is needlessly creating a lot of dates - and there could be 100s of these timers running at the same time ... Can anyone suggest a better way to do this?
    That doesn't sound good. Why would you have so many?
    I'm just looking for suggestions. I guess I could try running this inside a profiler. As a side note, is there a better way to print the stopwatch output to the screen? It seems like overkill to constantly update a Label's text property ... hundreds, maybe thousands of times especially when there may be 10 or so timers running on the same screen. Does anyone have any advice for stopwatch type 'update the time' label behavior?
    I'm doing this in an NSTimer potentially set to fire every .01s ... IE: this method will get hit quite a bit ...
    That doesn't seem like a side note. That seems like the main point.
    As "good" video is typically around 30 frames per second, it doesn't make any sense to update the user interface any more frequently than that. Also, you really only need one timer. Let that timer update all the values. You may not need any timers. You could do everything via key-value coding and let the OS handle all the work.

  • Time Comparison PHP

    Hi There
    I am trying to create a time comparison for a website I am building.
    I have the following so far
    <?php
    $date=$_POST ['daydropdown'];
    $month=$_POST ['monthdropdown'];
    $year=$_POST ['yeardropdown'];
    $datevalue="$date/$month/$year";
    $booking=strtotime ("now + 24 hours");
    if ($date_value > $booking)
    echo ("lovey");
    else
    echo ("tut tut");
    ?>
    which is pulling its date info from
              <form action="timetest.php" method="post">
              <table>
      <tr>
        <td class="tableheight">
          Party Size</td>
        <td>
          <select name="partysize" size="1" id="partysize">
          <option>1</option>
          <option selected="selected">2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option>20</option>
        </select>
        </td>
      </tr>
      <tr>
        <td class="tableheight">Date</td>
        <td>
    <select name="daydropdown" id="daydropdown">
    </select>
    <select name="monthdropdown" id="monthdropdown">
    </select>
    <select name="yeardropdown" id="yeardropdown">
    </select>
    </td>
      </tr>
      <tr>
        <td class="tableheight">Time</td>
        <td><select name="time">
          <option>12 noon</option>
          <option>12:15pm</option>
          <option>12:30pm</option>
          <option>12:45pm</option>
          <option>1:00pm</option>
          <option>1:15pm</option>
          <option>1:30pm</option>
          <option>1:45pm</option>
          <option>2:00pm</option>
          <option>2:15pm</option>
          <option>2:30pm</option>
          <option>2:45pm</option>
          <option>3:00pm</option>
          <option>3:15pm</option>
          <option>3:30pm</option>
          <option>3:45pm</option>
          <option>4:00pm</option>
          <option>4:15pm</option>
          <option>4:30pm</option>
          <option>4:45pm</option>
          <option>5:00pm</option>
          <option>5:15pm</option>
          <option>5:30pm</option>
          <option>5:45pm</option>
          <option>6:00pm</option>
          <option>6:15pm</option>
          <option>6:30pm</option>
          <option>6:45pm</option>
          <option>7:00pm</option>
          <option>7:15pm</option>
          <option>7:30pm</option>
          <option>7:45pm</option>
          <option>8:00pm</option>
          <option>8:15pm</option>
          <option>8:30pm</option>
          <option>8:45pm</option>
          <option>9:00pm</option>
          <option>9:15pm</option>     
    </select></td>
      </tr>
      <tr>
        <td class="tableheight">First Name</td>
        <td><input name="firstname" type="text" placeholder="Your First Name" /></td>
      </tr>
      <tr>
        <td class="tableheight">Surname</td>
        <td><input name="surname" type="text" placeholder="Your Last Name"/></td>
      </tr>
      <tr>
        <td class="tableheight">Email Address</td>
        <td><input name="email" type="email" placeholder="Your Email Address"/></td>
      </tr>
      <tr>
        <td class="tableheight">Confirm Email </td>
        <td><input name="confirm" type="email"  placeholder="Confirm Email"/></td>
      </tr>
      <tr>
        <td class="tableheight">Contact Number</td>
        <td><input name="contactnumber" type="text" placeholder="Your Contact Number"/></td>
      </tr>
      <tr>
        <td style="padding-top:0px"><input name="Book Now" type="submit" value="Book Now" /></td>
        <td></td>
      </tr>
    </table>
              </form>
              <script type="text/javascript">
    //populatedropdown(id_of_day_select, id_of_month_select, id_of_year_select)
    window.onload=function(){
    populatedropdown("daydropdown", "monthdropdown", "yeardropdown")
    </script>
    What I want to happen is if a booking for a table is made for more than 24hours in advance then its fine and sends the reservation to the restaurant aka "Lovely" where as if its for within the next 24 hours then "tut tut" they are told to ring the restaurant.
    Does anyone have any pointers for me please.
    G

    You need to change the $datevalue variable to a timestamp like you did with $booking.
    $dateTried = strtotime($datevalue); 
    Then you can compare them.
    if ($dateTried < $booking) {      // this is what to do if the time chosen was within 24 hours } else {      // this is what to do if the time chosen was a valid value (24 hours or more from current time) } 
    BTW, it looked like your form fields are populated using JavaScript. If I were you I would switch that to be PHP driven. The code will be very similar in PHP as your JavaScript code, but it will work for all your visitors, not just the ones that have JavaScript enabled.
    -Jason
    Sorry the code didn't line up. I used the wrong code insert options.
    Message was edited by: UteFanJason

  • Database time comparisons from RAT

    I am using Real Application Testing to test moving to a new server and I am a little confused on the “database time” comparisons. I ran the capture for 5 minutes and 54 seconds, the database time for the CAPTURE shows 33 minutes and 29 seconds, when I replayed it the REPLAY shows database time for 6:09 but the actual duration was only 5:57.
    So this tells me that it took about the same amount of time to play back the workload but I don’t understand the database time. Can somebody help me out with this? Thanks.

    I have not done RAT but my guess is the CAPTURE time is the cumulative time consumed by sessions on database for the given workload.

  • Apple TV, Time Machine and External Drives

    I have an apple TV, A 1TB time capsule and a 1GB hard drive attached to the time capsule. My itunes library is too big for the apple TV. My itunes application is on my laptop and my library is on the storage drive, backed up by time machine.**
    My question - Obviously any content I sync to apple TV is available to the whole family but am I right in thinking that all the other content that can't be synced because of size can only be accessed when I am at home with my laptop?
    If so then it would appear that mac have invented a fantastic product but made the weird assumption that our home movies, audio and movie downloads will not exceed the maximum size of the ATV unless we buy a dedicated computer! I am not much better off than I was when I simply streamed music through airport or had my ipod connected to my stereo. Because I cant sync my whole library I have to sync only playlists so there is no cover flow, just a list to scroll through same as I had on my ipod!
    It makes me wonder if the design and marketing department at apple have lost the plot and concentrated on media sales rather than customer satisfaction. If you take into account that the itunes movie rentals are more expensive and no more recent than those in Blockbuster (I just rented 5 blue ray for £10.00) then the ATV is looking like a temporary toy that already fails to meet the needs of the average consumer. I love apple products but at the moment I'm thinking I could have just plugged endless storage devices into my playstation and achieved much more.
    Someone please tell me I'm wrong.......

    flintonmac wrote:
    Thats a rather ragged defence of a poor bit of design.
    It's not a defence, it's an explanation. If you don't like the Apple tv model then fair enough but it's not bad design by any stretch of imagination. My point being that Apple tv deliberately moves away from the model you seem to want to follow, you have your right to your opinions but you need to accept this isn't what most people want and why you can now rent 5 disks for £ 10 from Blockbuster.
    My main point. If you don't sync your whole itunes library then you have to scroll through a playlist which removes the convenient cover flow interface
    Not at all, there is no cover flow and lets hope that if there ever is, it's an option only. Cover flow is very pretty but quite impractical for large libraries.
    and leaves you in the same position as you would be scrolling through the content of external drives on any other media player.
    Not at all, all the other media players I have reviewed have resulted in a chaotic interface when it comes to searching for media on attached drives.
    It would not have been hard for apple to allow itunes to send a playlist that is seen by the apple tv as its entire content.
    That's exactly what the Apple tv does. It strikes me that you haven't really taken the time to see how the Apple tv works properly or what it has to offer you.
    My secondary point. Apple is behind most other service providers in terms of providing access to new releases and price.
    Again that's incorrect, Apple offers similar content to some other online media providers but usually more than most. It's true that in comparison to traditional physical media, it's offerings are somewhat poorer but this is the result of protectionism applied by the movie studio to try to support a flagging physical medium industry, all online suppliers have the same issue with the movie studios.
    While I am moaning...... The HDMI connection stays live even in standby so every user has to reach behind the TV when changing from apple to cable tv. Not a reasonable solution so it means that I use the AV outputs instead. If you link that to my second point then yes I can rent DVD's in HDMI but I have to change my cable set up before I do.........
    If this is an issue with the Apple tv then it's something that does need resolving, but at this stage you can't say for sure it's not your tv, if it works fine on one port but not on another it sounds more like the tv to me. None of the 5 tv's we have that have an Apple tv connected to them display this behaviour.
    Your points are very valid in your case, I'm not dismissing them, just pointing out the model you would seem to prefer is the model that most people are wanting to turn away from, so it isn't bad design, it's just that you don't like it.

  • Stored Procedure using Date/Time Comparison

    I’m running SQL Server 2012. I need to write a procedure that will send out emails based on a date/time comparison.
    In my table, ‘tickets’, I have a smalldatetime column ‘ticket_date’ and another column ‘responded’ which is a bit field. I need to check the current date to see if 24 hours has passed from the ticket_date. If 24 hours has passed and responded is 0, then
    I need to email a manager ( I already have the code for  emailing with SMTP).
    The next step is to see if 48 hours has passed from the ticket_date and if responded is 0.
     If this is true, then I need to email someone else.
    I don’t want to include weekends in my time comparison. My procedure will only run Mon – Fri. 
    Thanks in advance!

    Check the below sample and hope this will help you:
    DECLARE @Tickets TABLE (TicketID INT, TicketDate SMALLDATETIME, Responded BIT)
    INSERT INTO @Tickets
    SELECT 1, '01/10/2015 10:00AM', 0 UNION ALL
    SELECT 2, '01/13/2015 12:00PM', 1 UNION ALL
    SELECT 3, '01/12/2015 05:30PM', 0 UNION ALL
    SELECT 4, '01/09/2015 08:00AM', 1
    SELECT *, '24 Hour' AS TicketCase
    FROM
    @Tickets
    WHERE
    Responded = 0
    AND DATEDIFF(HOUR, TicketDate, CURRENT_TIMESTAMP) <= (CASE DATEPART(WEEKDAY, TicketDate) WHEN 7 THEN 48 WHEN 1 THEN 24 ELSE 0 END) + 24
    UNION ALL
    SELECT *, '48 Hour' AS TicketCase
    FROM
    @Tickets
    WHERE
    Responded = 0
    AND DATEDIFF(HOUR, TicketDate, CURRENT_TIMESTAMP) >= 24
    AND DATEDIFF(HOUR, TicketDate, CURRENT_TIMESTAMP) <= (CASE DATEPART(WEEKDAY, TicketDate) WHEN 7 THEN 48 WHEN 1 THEN 24 ELSE 0 END) + 48
    Output
    TicketID | TicketDate | Responded | TicketCase
    3 | 2015-01-12 17:30:00 | 0 | 24 Hour
    1 | 2015-01-10 10:00:00 | 0 | 48 Hour
    You can make the separate SQL statements and email to proper people based on 24 hour or 48 hour case. 
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • HT201250 Can I partition my external hard drive and use one partion for time machine and the other one for data that i may want to use in different computers?

    I have this doubt. I've just bought an external drive, especifically a Seagate GoFlex Desk 3 tb.
    I want to know if it is recomendable to make a partion exclusively for time machine and let another one so I can put there music, photos, videos, etc that I should need to use or copy to another computer.
    May half and half, 1.5 tb for time machine and 1.5 tb for data.
    I have an internal hard drive of 500 GB (499.25 GB) in my macbook pro.
    Any recommendation?

    As I said, yes. Be sure your Time Machine partition has at least 1 TB for backups.
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to two (2). Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.

  • Can I have two Time Capsules in the same network, use one as Time Machine and other to expand network?

    I need to purchase a divice to expand my Wi-fi network. I was looking at the AirPort Extreme, but a friend has a brand new Time Capsule for sale. So, for the same price of the AirPort Extreme, I´m getting the Time Capsule.
    I already own one and using it as Time Machine and wireless router. If I decide to purchase another TC would it have any conflict with the one that I already have?
    Is it possible to use one as Time Machine and wireless router and the other to just expand network and storage only (not as Time Machine)?

    If I decide to purchase another TC would it have any conflict with the one that I already have?
    No
    Is it possible to use one as Time Machine and wireless router and the other to just expand network and storage only (not as Time Machine)?
    Yes. The important thing to remember is that the "extending" Time Capsule must be located where it can receive a strong wireless signal from your "main" Time Capsule.

  • Can I use my external HD for Time Machine and still use it for storage?

    I have a 1TB external HD and my computer has yet to arrive. I was planning on backing it up via Time Machine and I'm wondering if my external HD will still be useable as a storage device once I pair it with Time Machine.
    There's no way the backup will take up the full 1TB of space, so I'm hoping it doesn't just go to waste >.<

    If you really only want backups of the current contents, don't use Time Machine.
    It's designed to keep copies of things you've changed or deleted for as long as possible. This allows you an excellent chance to recover a previous version of something you changed or deleted in error.
    It also allows you to revert your entire system to the exact state it was in at the time of any previous backup, even if that's a different version of OSX. It's rare, but if an OSX update, or installation of a kernel extension or 3rd-party app makes a huge mess, it's much easier and more reliable than rebuilding everything.
    You might want to review the [Time Machine Tutorial|http://www.apple.com/findouthow/mac/#timemachinebasics] and perhaps browse [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum). See #1 there for size considerations.
    For alternatives, see Kappy's post on [Basic Backup|http://discussions.apple.com/thread.jspa?messageID=12366915#12366915].

  • Can I use my creative cloud products on more them one system at a time (Mac and PC)

    Can I use my creative cloud products on more them one system at a time (Mac and PC)
    I want to use the premiere on my Mac and some times on my PC.
    Can  I use it on other operating systems with one membership or do I have to purchase an other membership for my other system.   I am only working on one system or the other at one time.
    Thx

    http://www.adobe.com/au/products/creativecloud/faq.html
    Are there any unique benefits that come with my paid membership?
    Yes, as a member of Creative Cloud, you get many benefits that you do not get when you purchase a traditional shrinkwrapped product:
    Access to both the Mac OS and Windows® versions of the desktop applications and the ability to install them on your primary computer and one backup computer. So, if you have a Mac at home and a PC at work, you can install your applications on both as long as they are not running at the same time. See the product license agreements page for more information.

Maybe you are looking for

  • Project cannot open: "Searching for Movie Data" in render file

    My feature-length project suddenly stopped loading today, pausing at 47% to complain that a bunch of render files are missing, and that "this movie cannot play without the file..." I've seen these error messages when trying to open Quicktimes that re

  • How to stop popup window using phone layout for display - Responsive HTML5, RH11

    Hello, I'm using the new Responsive HTML5 output in RH11. For some of my hyperlinks, I want to use a pop-up to display the linked topic. In the output, the pop-ups work, but they are automatically displayed using the phone layout, with the associated

  • Need help importing HD footage from external hard drive

    I have an external hard drive with some footage from a friend. I cannot view the footage either in QT or through importing to FCP. I have version 4.5 of FCP HD. The audio works on the clips, but the video does not. Im guessing it might be a format is

  • PanelFormLayout Alignment inside panelGroupLayout

    Hi Following is the code of my jsff page. It has a panelGroupLayout in the top with two panelHeaders. Each of the panel Header has a panelFormLayout inside it. When i run this page, the panelFormLayout dont align with each other. Please suggest a met

  • Query regarding open items

    hi experts, can any body tell me in fbl1n if i put the posting date 01.04.2008 to 29.07.2008. on 28.07.2008 i am getting a balance and balnce showing in cleared items but if i didnt put any date i am getting zero balance. whts the reason????? regards