Denote absolute time and absolute time calculations

We have Oracle database 11g in our production environment on RHEL 5.8 Virtual machine using VMware. The database version is 11.2.0.3.0.

I have a certain scenario here, I want the code of the logic of a trouble ticket solution. The working hours for problems resolution ticket is 8 am-8 pm and resolution time is 4 hours. Now if a ticket will be logged at 18:30, his expected resolution time should be 10:30 the next day (1.30 hours of standby and 2,30 hrs the next day). I am not able to understand as below:

  1. How to write a subtraction of absolute time from 20:00 to 18:30 (18:30 can be a DB column so it is fine). The main concern here is how represent absolute time of 20:00.
  2. Subsequently, also how to add time of 08:00 the next day

I hope that I was able to explain the application of absolute time representation and also calculations with it.


Please get back with the answer to my query.


Concerning

with inp as

(select sysdate log_time to double

Union all select trunc (sysdate) + numtodsinterval (6.5, 'hour') of double

Union all select trunc (sysdate) + numtodsinterval (18.5, 'hour') of double

)

log_time Select to_char (log_time, "dd-mm-yyyy hh24")

to_char (case

When log_time - trunc (log_time)< 8="" 24 ="" then="" trunc(="" log_time="" )="" +="" (="" 8="" 24="" +="" 4="" 24="">

When log_time - trunc (log_time) > 20 / 24 then trunc (log_time) + (1 + 8 / 24 + 4 / 24)

When log_time - trunc (log_time)< 20="" 24="" -="" 4="" 24="" then="" log_time="" +="" 4="">

of another trunc (log_time) + (1 + 8 / 24 + 4 / 24 + (log_time - trunc (log_time) - 20 / 24))

end, "dd-mm-yyyy hh24") expected_resolution_time

the NPI

Tags: Database

Similar Questions

  • I'm figuring (add) a column on a PDF form and on the calculation tab, it doesn't let me select (check) the fields I want to calucalate.  It won't let me type in the fields of the box either.

    I'm figuring the shape (add) a column (sum) on a pdf file and on the calculation tab, it won't let me select (check) the fields I want to use in the calculation.  It won't let me type fields in the box either.  I'm doing something wrong?

    the mouse click on the name of the field and press the space key

  • dialog remaining time calculation and then crashes...

    When you remove the desktop icons, the dialog box hangs after the display of the mention "calculating time remaining".

    Hello
     
    1. are you able to delete files from other locations without any problems?
     
    We recommend that you cross check if the problem persists in safe mode. To start the computer in safe mode, try the following steps.
    1 start the computer in the boot system key F8 continually tap water to get the menu "advanced boot options", from the menu select "safe mode" using the arrow keys and press ENTER to start.
    2 will take time to move to the screen drivers. Once you get the login screen, log in as "ADMINISTRATOR".
     
    For more information about safe mode, see this link:
    http://Windows.Microsoft.com/en-us/Windows-Vista/start-your-computer-in-safe-mode
     
    You can also delete files using Disk Cleanup tool, visit this link for more information:
    http://Windows.Microsoft.com/en-us/Windows-Vista/delete-files-using-disk-cleanup
     
    Try the steps and post back with the results, so that we can help you further.
     
    Kind regards
    Syed
    Answers from Microsoft supports the engineer.
  • App for the time and payroll sheet calculations

    My daughter in hospitality makes work so much split and travel on a Saturday and Sunday. I am looking for an application that we can punch in his hours for the week and be able to do the calculation of salary based on the appropriate hourly rate so that we can keep control of when it is paid as it's done correctly. Essentially, I'm lookin for an app connects timesheet information to the payroll data. Such an application exists and if so can anyone recommend one? Happy to pay for an if need be.

    Hello alissah6,

    Numbers from Apple is what I would recommend as far as doing calculations with a simple formula. You can learn more about this here.

    The application costs $14.99, however it is packed and has more than 30 models - not to mention, you can also create your own if necessary.

    I would check it out certainly if I'm looking for a few terms related to pay calculation in the App Store.

    Thank you

    James.

  • Start time and end of timestamp time calculation

    Hi all

    I have an entry below,

    Channel_number GPS_TIME
    581513-05-2013 18:56:46.410000
    581513-05-2013 18:56:47.410000
    581513-05-2013 18:56:48.410000
    581513-05-2013 18:56:49.410000
    578013-05-2013 18:56:49.510000
    578013-05-2013 18:56:50.410000
    578013-05-2013 18:56:51.410000
    581513-05-2013 18:56:51.510000
    581513-05-2013 18:56:52.410000

    I'm trying to get the result as below,

    CHANNEL_NUMBER BEGIN_TIME End_time
    581513-05-2013 18:56:46.41000013-05-2013 18:56:49.410000
    578013-05-2013 18:56:49.51000013-05-2013 18:56:51.410000
    581513-05-2013 18:56:51.51000013-05-2013 18:56:52.410000

    Please, help me find it.

    Thank you all

    with

    the_data as

    (select 5815 channel_number to_timestamp ('2013-05-13 18:56:46.410000 ',' yyyy-mm-dd hh24:mi:ss.ff') gps_time of all the double union)

    Select 5815, to_timestamp ('2013-05-13 18:56:47.410000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5815, to_timestamp ('2013-05-13 18:56:48.410000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5815, to_timestamp ('2013-05-13 18:56:49.410000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5780, to_timestamp ('2013-05-13 18:56:49.510000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5780, to_timestamp ('2013-05-13 18:56:50.410000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5780, to_timestamp ('2013-05-13 18:56:51.410000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5815, to_timestamp ('2013-05-13 18:56:51.510000 ',' yyyy-mm-dd hh24:mi:ss.ff') of all the double union

    Select 5815, to_timestamp (' ' 2013-05-13 18:56:52.410000 ',' yyyy-mm-dd hh24:mi:ss.ff ") of the double

    )

    Select channel_number, begin_time, end_time

    from (select gr,

    channel_number,

    FIRST_VALUE (gps_time) on begin_time (gr stopped by gps_time partition),

    FIRST_VALUE (gps_time) on end_time (gr stopped by gps_time desc partition),

    ROW_NUMBER() on rn (gr stopped by gps_time partition)

    from (select channel_number, gps_time,

    ROW_NUMBER() on row_number() (order of gps_time) - on the gr (partition by order of gps_time channel_number)

    of the_data

    )

    )

    where rn = 1

    begin_time order

    CHANNEL_NUMBER BEGIN_TIME END_TIME
    5815 13 MAY 13 06.56.46.410000000 PM 13 MAY 13 06.56.49.410000000 PM
    5780 13 MAY 13 06.56.49.510000000 PM 13 MAY 13 06.56.51.410000000 PM
    5815 13 MAY 13 06.56.51.510000000 PM 13 MAY 13 06.56.52.410000000 PM

    Concerning

    Etbin

    Post edited by: Etbin me or Apex we missed something in the original post

  • need a little help with time calculation

    Hello

    I tried to implement oauth2 and youtube api. I can connect and can recover the access_token and other oauth required as expires_in json values.

    What I'm trying to do is drive if my access token is valid or not before making another call to their api - youtube gives a value - expires_in that normally contains 3600, which I suppose is seconds. I'm trying to add this time now using clock_gettime(), but I don't get correct values for my calculation - nowTime + expiresInt.

    Anyone can point out the problem with my code please? It could be a bad way to do it, but I thought that I spent a few hours on this subject before asking for help.

    Thank you.

    token = c.value("access_token").toString().toStdString();
        refreshtoken = c.value("refresh_token").toString().toStdString();
        saveValueFor("access_token", QString::fromStdString(token));
        string expires = c.value("expires_in").toString().toStdString();
        saveValueFor("refresh_token", QString::fromStdString(refreshtoken));
        struct timespec* start;
        clock_gettime(CLOCK_REALTIME, start);
        int nowTime = start->tv_sec;
        std::stringstream str(expires);
        int expiresInt;
        str >> expiresInt;
        nowTime += expiresInt;
        stringstream nowTimeString;//create a stringstream
        nowTimeString << nowTime;//add number to the stream
    

    Now you install milliseconds and seconds.

  • How to add or subtract 2 times, calculation with the calculator of windows 7?

    For example:

    I want to add 2 different times as follows. More time is with the format hours: Minutes: seconds.

    H MM SS

    01:50:31

    + 2:20:30

    -------------------

    04:11:01

    How to perform this calculation of time with Windows 7 or any other Calculator calculator in Windows 7.

    Response.

    In your example:

    First add the hours, the minutes and the dry separately

    Hours = 1 + 2 = 3

    MN = 50 + 20 = 70

    Seconds = 31 + 30 = 61

    Now, to calculate whole minutes because of the second column:

    61 seconds/60 = 1.016 mins (approx.)

    Ignore the bits after the comma, and add whole minutes in the minutes column:

    MN = 70 + 1 = 71

    Calculate the seconds remaining:

    61. 60 = 1 second.

    Now, calculate hours because of the minutes column:

    71minutes/60 = 1.183 hours (approx.)

    Ignore the bits after the comma and add hours to the column of the hours:

    Hours = 3 + 1 = 4

    Calculate the remaining minutes:

    71 60 = 11 min.

    That is why total is:

    4 hours, 11 minutes, 1 second.

    The calculator is not a huge help to make these kinds of calculations because it works in decimal which means he cannot directly calculate/convert seconds/minutes/hours located in several of the early 1960s. If you had a spreadsheet like Excel you could set up (with a little work) to do this kind of thing.

  • Flight time calculation, js help

    I hope you did not get too tired of my questions yet, but I learned a lot in the last days of this forum on this project and make me much better grasp on Adobe Livecycle.

    My current problem and I hope before the end is a method to calculate the total time between the hours of departure and arrival of a flight I currently have the script from h to h, h and h, h to h and h. The question arose when I was told that it would take international travel and flights over 12 hours would be taken, that's why I added the date/time fields to enter date also. So far, my thoughts are going to write a conditional statement that indicates whether the date fields match, perform lag normal calculations but I don't know what to do if they do not match.

    I was wondering if anyone had a better method or could help me to solve this problem with some built-in features with javascript or formcalc because I'm still new to this and not find them. Ideally, I'd like the person to enter a date and time of departure and arrival and then calculate milliseconds between the two and convert to hours. Any ideas or advice? I will attach a picture of the pdf to illustrate if everything goes well I am doing better and can send the file to someone who has ideas.

    Thank you!

    untitled.JPG

    Hello

    The rawValue of a date field will always be in the yyyy-mm-dd format, so you will need to reformat the code.  Try something like;

    var d = / (\d\d\d\d)-(\d\d)-(\d\d)/.exec(DepartureDate.rawValue);

    If (d! == null)

    {

    Departure of var = new Date (d [1], [2] d-1, d [3]);

    util.printd ("dd mmm yyyy", start) + "" + (DepartureTime.formattedValue | "") ") +" "+ (DepartureTimeZone.rawValue |" ") ») ;

    }

    If you are happy with the display being "dd mmm yyyy" format then you can use the formattedValue rather property (as I did at the moment) and ignore the whole thing the conversion date.

    The time domain that I use is a field of Date/time but has a format of data (on the link tab) of the time.  You do not get a time picker, but it adds a few smarts, if you type 11 it converts at 11:00.

    I wrote a sample to test this, https://acrobat.com/#d=jRaH7EF * vPix7tBzF-n1JA

    I used a drop down for the time zone, as you seem, but this could get quite long, as a number of places have been time of 30 minutes and my Windows machine has as GMT + 5:45 Kathmandu

    I hope this helps.

    Bruce

  • Database queue time calculation.

    Hi, I use 10.2.0.4.0 oracle version.

    I need to find the queue time total for each day for each WAIT_CLASS and need to trace trends in the last days. I use the application below to get the details, but my results do not match with the ones I get in the AWR report. In my daily report AWR, "USER i/o" is coming in higher class waiting times, where as in my query, I get 'Application' on the highest expectation section. Total wait time is also different. Can you please help me to understand, what don't understand me in the query?
    SELECT  wait_class, 
         TO_CHAR (MIN (s.end_interval_time), 'DD-MON-YYYY DY HH24:MI')
             sample_end,
            SUM (WAIT_TIME + time_waited)  waittime
     FROM dba_hist_active_sess_history q, dba_hist_snapshot s
    WHERE   s.snap_id = q.snap_id
          AND s.dbid = q.dbid
          AND s.instance_number = q.instance_number
          AND s.end_interval_time >=
                 TO_DATE (TRIM ('16-Oct-2012 '), 'dd-mon-yyyy hh24:mi:ss')
          AND s.begin_interval_time <=
                 TO_DATE (TRIM ('18-nov-2012 '), 'dd-mon-yyyy hh24:mi:ss')
         AND wait_class in ('User I/O','System I/O','Concurrency','Commit','Other','Configuration','Network','Application','Administrative')
     GROUP BY trunc(s.end_interval_time),wait_class
    ORDER BY trunc(s.end_interval_time),waittime desc
    SELECT Trunc(end_interval_time),
           wait_class,
           SUM(time_waited)
    FROM   dba_hist_service_wait_class
           join dba_hist_snapshot USING(snap_id)
    GROUP  BY Trunc(end_interval_time),
              wait_class
    ORDER  BY Trunc(end_interval_time),
              wait_class; 
    

    Published by: JohnWatson on 7 November 2012 16:34
    Formatting.

  • Reset a loop counter and restart the calculation

    I have a while loop nested inside a loop for the calculation of a model.

    Lets say that I am on the loop for counter 4. Suppose that I wanted to keep track of the number of iterations on a while loop, and if it exceeded a certain 100, exit say number the while loop.  I do this to avoid my model of computation being blocked somewhere due to optimization problems. Now, I want to restart the loop counter calculations 4.

    Is there a way to do this in labview?

    Well first of all, if you want to start the same program inside loop after it got stuck is going not only to get stuck again creating a permanent loop in the code? Would you not just to go and have some sort of identifier as one of the loops is stuck?

    But I recommend just nesting your while loop inside an another while loop, and then connect the output to the out-while loop to a variable of the while loop inside, so if optimisation did not appear correctly then it simply repeats the inner while loop.

    Although I am of my thoughts that you will end up just straight up in a loop permanent if optimization fails the first time.

  • Start and End DateTime calculations

    Dear all

    I have 3 fields start time, end time and hours. I want that if I give hours then the start time should be filled in with the current date and time and end time must be calculated accordingly. Suppose I have hours = 1 then start time should be May 17, 2015 11:25:30 and end time should already be filled in 17 may 2015 12:25:30

    Use this:

            DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
            Calendar cal = Calendar.getInstance();
            System.out.println("Start Time : " + dateFormat.format(cal.getTime()));
            cal.add(Calendar.HOUR, 1);
            System.out.println("End Time : " + dateFormat.format(cal.getTime()));
    

    See you soon

    AJ

  • Monthly and Sub Total Calculations

    Hey guys hope all of you are ok... I was wondering how is the Total monthly void and sub total fields are calculated in quotes > pricing screen? Both are read-only, and I wonder how a Siebel calculates these fields.


    Thank you for your time,

    Hello
    Sorry can't help you with that. Siebel Tools receives over and repeatedly does not meet my uses too. Guess they want to do an audit of patience on users :)
    Try to wait a while if you have little patience and if possible make a full get all projects on your development environment. There may be some issues with the details of the applet.

    Thank you and best regards,
    Yassine jegou

  • Virtual data center provider and Clusters of calculation ESXi

    I have 5 ESXi compute clusters, each with 10 ESXi servers in them.  Can I have more than one virtual data center provider for a single ESXi Compute Cluster?

    A links of virtual data center (pVDC) provider of a simple installation resources pool.  As many times as the list of resources is a list of resources of a ROOT cluster, but it doesn't have to be.

    You can extend your pVDC with "elastic pVDC" and the provider of a link to several resource pools (careful with this, you can not just move resources from one to the other to release one later)

  • Table data collection and using other calculations

    Hi all!

    I have a table with the information (values), I want to read and collect the 4 values in the table. These must serve more than calculations.

    Take a scenario:
    Let's say the row index is 2.5 and the column index is 5.6 (these values are other calculations), so I'd like to collect the values of the matrix, return (2.5) (2.6) (3.5) and (3.6). Thus, in the closest base to the index value of two integers.

    The next step is to use these four values make a bilinear interpolation (that's my problem), but in order to use them, I need to get them into a knot of formula.

    To sum up; How to collect and store the 4 values for further calculations.

    I hope I explained good enough!

    PS! I'm rather new on LabVIEW, love until now

    Sounds like what you are really looking for is 2D.vi interpolate. Check it out on the range of mathematics under the Interpolation.

    Or you use another type of interpolation function?

    No need to reinvent the wheel if your 2D table represents just the nodes on a surface.

  • The soft and critical path calculation

    Hello world

    I'm trying to find some documentation on the critical path and how soft is calculated in Instantis but unfortunately can not find. I hope that it calculates the standard way (criticism = 0 or minus 0 soft; soft = difference between the dates earlier to one less than the later dates of a task task) but seeks to find confirmation for that.

    Any help is appreciated. Thank you

    Eva

    Eva,

    Instantis made a pass forward and backward on the planning activities, looking for the critical path.  These activities have 0 slack or float as well as any changes that they will change the project completion date.

Maybe you are looking for