Convert a representative number 'working day' in hours

I have a query that pulls in a column < Completion_Days > this working days as a value list that appears in the range between 0 and up to perhaps 10 or higher.
What I need to do, is that digital to convert to a format of HH:MN:SS time.

There are an other columns < Completion_Hours > and < Completion_Minutes > I also want to convert it to a time so format. Here is a sample of my data:

SEQUENCE DAYS COMPLETION_HOURS COMPLETION_MINUTES
1 0 0 15
2 0 0 15
3 1 0 0
4 0 0 15
5 0 0 15
6 1 0 0
7 0 0 15
8 0 0 15
9 0 4 0
10 0 0 15
11 0 4 0
12 0 4 0
with sample_table as (
                      select  2 Completion_Days,
                              4 Completion_Hours,
                              15 Completion_Minutes
                        from  dual union all
                      select  0 Completion_Days,
                              4 Completion_Hours,
                              5 Completion_Minutes
                        from  dual
                     )
select  case
          when Completion_Days * 8 + Completion_Hours < 10 then '0'
        end || (Completion_Days * 8 + Completion_Hours) || ':' || to_char(Completion_Minutes,'FM00') || ':00' res
  from  sample_table
/

RES
------------
20:15:00
04:05:00

SQL> 

SY.

Tags: Database

Similar Questions

  • Number of days worked if the criteria of

    I'm looking for a formula counting the number of days, I worked my last day of rest, sheet 1, if it meets the date displayed in cell D2 in sheet 2, which is the Start Date and time after my rest day.

    sheet 1 has the info.

    D = 'Date' Date and time format

    E = "Duration" personalized hr: mm (start time)

    F = "Duration" hr: mm custom (arrival time)

    G = "Duration" hr: customized mm (total length)

    sheet 2

    D2 has a sum which adds the sheet 1::Table 1::D2 + 1::Table Sheet 1::E2 equals 03/12/16 17:50.  Format: Custom, Date & time, Format custom: 05/01 07:08 drag token or text etc.

    Any ideas how I can do this please.

    Thanks David

    Hi David,

    I don't get a clear idea of what you're trying to do. Can clarify you, perhaps with a screenshot showing examples of the values in the cells involved?

    Kind regards

    Barry

  • looking for VI where I can convert covert a number floating representation Q 11.5

    looking for VI where I can convert covert a number float Q 11.5 Representation and what exactly the means of representation Q 11.5.

    Kindly help me on the same.

    Seems to be good, but don't forget to round to the nearest integer.

    http://zone.NI.com/reference/en-XX/help/371361H-01/Glang/round_to_nearest/

  • calculate the number of days excluding non-working days

    11.2.0.4

    theres a fairly common request over the years to get the diff between 2 dates, excluding weekends, theres many ways to to do, however, I would like to go a step further and exclude everything not professional

    day.

    We have a company function that calculates whether a date is a holiday for our Organization.  We can pass a date and we have a Y or N back.     In the example below, the l' appel call function shows there for Saturday to show how we can identify the non-working day.

    Can anyone think of a way that we could use to get a sum of N s between 2 date fields in a line using this function?   IM thinking if we get the right formula/function to create a virtual column with calculating pre built as it can start to get expensive if she had to loop through every possible day between 2 dates to see it is a business day, all by a count.

    create the table t1_count

    (identification number,

    date of TS1,

    date of TS2)

    insert into t1_Count

    values (1, sysdate, sysdate - 7);

    insert into t1_Count

    values (2, sysdate, sysdate - 4);    -Saturday

    commit;

    SELECT id, ts1 ts2, .isholiday (ts1), isholiday (ts2) of t1_count;

    106/03/2015-14:30:5127/05/2015 14:30:51NN
    106/03/2015-14:32:2930/05/2015 14:32:29NTHERE

    That fold to my brain...

    ABS (trunc (sysdate - 40) + level - 1 - trunc (sysdate)) that's equivalent to the abs (level - 41)...

    Why not just level<=>

  • in the cloud? Number of working days derive from timestamp

    Y at - it a connector or an app that can take a DATE (for example 01/10/2012) and calculate the number of working days?

    No, the date calculator is only calendar days, not working days (should be enough culturally fancy that geo had what holiday...).

    The easy solution (but hacky) is to the calendar days * 5/7, bringing the working days... not elegant, but it converges on ~ accurate with many...

  • Number of days since 31/12/1979 converting a date value?

    Hi all

    I'm not an expert in oracle sql and I hope that someone could help me.  A column of a table is titled BHS_KDTE_SEQU.  This column has 111616 lines and the values stored in these areas are the number of days since 31/12/1979.

    When I write a select statement, how can I convert to get the date value since 31/12/1979 instead of the number of days?

    Thank you in advance!

    Hello

    f429ff94-4133-48E0-AE1C-afcb148d3c2f wrote:

    Hi all

    I'm not an expert in oracle sql and I hope that someone could help me.  A column in a table is called BHS_KDTE_SEQU.  This column has 111616 lines and the values stored in these areas are the number of days since 31/12/1979.

    When I write a select statement, how can I convert to get the date value since 31/12/1979 instead of the number of days?

    Thank you in advance!

    Then

    1 means January 1, 1980,

    2 means January 2, 1980,

    ...

    31 January 31, 1980, means

    32 means February 1, 1980.

    ...

    366 means December 1, 1980,

    367 means January 1, 1981,

    and so on?

    Here's one way:

    SELECT DATE ' 1979-12-31' + bhs_kdte_sequ AS dt

    TABLE;

    When you add a DATE d and a NUMBER n in Oracle, the result is the DATE n days after days.

    I hope that answers your question.

    If not, post a small example of data (CREATE TABLE and INSERT statements) and the exact results you want from these data.

    Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?

  • Procedure for the number of working days per month when the user enters to and from everyday

    Hi all

    Can provide you a solution to this - procedure for the number of working days per month when the user enters and days.

    Suppose that the user enters November 18, 2014 start date and date as November 23, 2014.

    The output should display

    Count: 4

    November 18, 2014 Mar

    Sea 19 November 2014

    November 20, 2014 game

    Fri November 21, 2014

    It will exclude Saturday and Sunday.

    Hello

    Here is an example of removing dates Saturday and Sunday:

    with days as(
         select (trunc(sysdate, 'YEAR') + level) as col from dual
         connect by level < 365
    )
    select * from days
    where trim(to_char(col, 'DAY', 'NLS_DATE_LANGUAGE=ENGLISH')) not in ('SATURDAY', 'SUNDAY')
          and col between to_date('18.11.2014', 'DD.MM.YYYY') and to_date('30.11.2014', 'DD.MM.YYYY')
    order by col;
    

    Cheerz,

    Stako

  • I need to get date-date by number of days, hours, minutes, seconds.

    I have two dates, A and b... .i need to get the B - number of days, hours, minutes, seconds.

    I need differnce between two dates in days, hours, minutes, seconds.

    the day was 8 hours. Sat/Sun off

    It's simple if we consider our regular calendar... .but how can I get the same if a work_calander...

    That is, for example, A = Fri evening 17:00
    B = Monday evening 17:00

    the result should be 8 hours... (Sat/Sun, judge 9-6 to the timetables of office.. .so 1 pm Friday and 7: 00 in the LUN)

    such a schedule is defined.

    Please give a solution

    Thanks in advance
    Prince

    Published by: Prince on August 27, 2008 23:42

    your query is not clear enough.

  • given number of working days for the current month to date

    Hello

    How can I get the number of days of data using SQL date? appreciate for your help. Thank you.

    Hello

    Whenever you have a problem, please report all that is necessary for people to recreate the problem and test their ideas.  In this case, including CREATE TABLE and instructions INSERT for all necessary tables (just a few lines, only relevant columns) and the results you want from this data.

    The syntax of a scalar subquery (that is, a query that takes the place of a single value, as in a CASE expression) is

    (

    SELECT...

    Of...

    )

    in other words, all of the query must be within parentheses surrounding nothing else.  It seems that you have the SELECT keyword in a CASE expression without a parenthesis opening right before she left.

  • Check the number of consecutive working days of Absence from a list of dates (F

    Hi all

    We have Oracle 11.5.7 Application human resources and I have a request to create an Absence report (using sql * more coding, which can be downloaded on the discoverer to run the report by the user) as follows:

    Columns of the sample:
    ABSENCE_CATEGORY
    ABSENCE_TYPE
    ABSENCE_START_DATE
    ABSENCE_END_DATE
    ABSENCE_DAYS

    Sample data:
    EMPLOYEE A (FOR LACK OF PERIOD 2009)
    ABSENCE_CATEGORY ABSENCE_TYPE ABSENCE_START_DATE ABSENCE_END_DATE ABSENCE_DAYS
    Annual leave, April 27, 2009 April 30, 2009 4
    May 4, 2009 educational leave may 4, 2009 1
    Leave annual P 5 May 2009 may 12, 2009 6
    ...

    TOTAL: 11 DAYS OF CONTINUOUS WORK ON LEAVE
    NOTES:
    MAY 1, 2009 HOLIDAY
    May 2, 2009 weekend & may 3, 2009
    Weekend May 9, 2009 & may 10, 2009

    B EMPLOYEE (FOR ABSENCE PERIOD 2009)
    ABSENCE_CATEGORY ABSENCE_TYPE ABSENCE_START_DATE ABSENCE_END_DATE ABSENCE_DAYS
    Annual leave, may 18, 2009 may 29, 2009-10
    ...
    TOTAL: 10 DAYS OF CONTINUOUS WORK ON LEAVE


    C EMPLOYEE (FOR ABSENCE PERIOD 2009)
    ABSENCE_CATEGORY ABSENCE_TYPE ABSENCE_START_DATE ABSENCE_END_DATE ABSENCE_DAYS
    8 June 2009 annual leave June 17, 2009 8
    ...
    TOTAL: 8 DAYS OF CONTINUOUS WORK ON LEAVE

    IF AN EMPLOYEE HAS TAKEN MORE CONSECUTIVE OR 10 WORKING DAYS SHOULD BE EXCLUDED FROM THE STATE.
    THAT IS WHY IN THE EXAMPLE ABOVE ONLY USED C MUST BE RETURNED BY THE QUERY.

    Ideas/comments if and how to achieve the highest performance will be much appreciated.
    Thanking you in advance,
    Best regards
    Elena

    Hello

    Cannot start a command with the keyword WITH in SQL * Plus 8 (or earlier).

    The best thing to do is to install a later version of SQL * Plus or SQL Developer. (You can have several versions, if you need. SQL * Plus 10 and more will not work with an Oracle database 8)

    Otherwise, you can re-write the query so that the command does not begin with the keyword WITH.
    For example:

    SELECT  *
    FROM    (  WITH A AS ...
            );
    
  • Calculate the number of days remaining until the next anniversary. Help, please!

    Hi guys,.

    I'm new to the forum and to the development of BB. So please do not judge harshly if the answer to my question seems obvious.

    I need to calculate the number of days until the next birthday (taking into account any valid birth date)

    After looking at the API and the forum search, I realized that I could

    calculate the difference between two dates in milliseconds and then divide the delta of the value of a day in milliseconds. That is to say:

    birthdayCalendar.set (Calendar.YEAR, those);

    Date1 = birthdayCalendar.getTime () .getTime ();

    date2 = System.currentTimeMillis ();

    Delta = date1 - date2

    numOfDays = delta\DateTimeUtilities.ONEDAY

    Here's my question. How do I create a valid date1 what about leap years?

    Maybe there's a better way to solve this problem?

    Any help is greatly appreciated.

    I agree that the determination of the number of days between today and Feb. 29 could be a little difficult, if it is not a leap year.  I suspect that the calendar has a certain built-in mechanism to compensate for this, but your solution to choose a date is better.

    DST has a role to play, and Yes, the calendar makes up for it.  Let us take two dates, for example (before DST) March 1 and June 1 (after the DST).  If you take a calendar and set the same hour, minute, etc., they are all the same except for dates, then subtract one from the other, and then divide by the number of milliseconds in 1 hour, you calculate the number of hours between the same time on two different days.  You will find that it is not a multiple of 24 hours - because there is actually an hour less than the number of days since the clocks move forward (in the northern hemisphere anyway...),

    In your case, you are not calculating the number of hours, you calculate the number of days.  But you will be dividing by [24 * (time in an hour)].  If you take [23 * (time in an hour)] and divide it by [24 * (time in an hour)], using arithmetic on integers, you will end up 0.  The easiest to get around this, who also works for the end of the DST too, is to simply add one hour to the date before the division.

    Hope that makes sense...

  • PL/SQL function to calculate the non-working days

    Hello

    I have the following pl/sql function which generates a number of days between two selected dates (i.e. excluding weekends). However, I also need to exclude specific holidays - day of Christmas etc. These holiday dates are stored in a table in our database (11 GR 2) called "HOLIDAY".

    How can I integrate the holidays which is held in the table of holidays in the following query to exclude these dates as well? I know how to write a separate funtion pl/sql for a number of days between two dates using SELECT... BUT I can't work out how to bring together them in a single query.

    Could someone show me how with the pl/sql / dates below please?

    Example of HOLIDAY table below.

    Thank you!

    TP

    create or replace
    function WORKING_DAYS (pi_start_date in date, pi_end_date in date) return integer
    
    is
    
    v_start_date date :=pi_start_date;
    v_end_date date:=pi_end_date;
    v_count integer:=0;
    
    begin
    
    while v_start_date <= v_end_date
          loop
                            if to_char(v_start_date,'D') not in ('6','7')                    
                            then
                            v_count := v_count+1;                       
                            end if;
                           
                    v_start_date:=v_start_date+1;
                   
          end loop;
         
    return v_count;
    
    end;
    
    

    (select '10-Apr-2013' as NWD from dual union all
    select '06-May-2013' from dual union all
    select '27-May-2013' from dual union all
    select '26-Aug-2013' from dual union all
    select '26-Dec-2013' from dual union all
    select '25-Dec-2013' from dual union all
    select '01-Jan-2014' from dual union all
    select '18-Apr-2014' from dual union all
    select '21-Apr-2014' from dual union all
    select '05-May-2014' from dual union all
    select '26-May-2014' from dual union all
    select '25-Aug-2014' from dual union all
    select '25-Dec-2014' from dual union all
    select '26-Dec-2014' from dual) HOLIDAYS
    

    Hello

    the link is on MOSC, not OTN... Here's a copy:

    This function calculates the number of days between two dates, ignoring weekends and holidays (if requested and if the holidays are stored in a table)

    I give an example of table 'public_holiday' with sample data, but users must ensure that their table contains the relevant data (all holidays within the maximum range of use of the service)

    CREATE TABLE public_holiday (calendar_day, DATE, text VARCHAR2 (30));

    FUNCTION to CREATE or REPLACE nb_days (p_date_from IN DATE

    p_date_to DATE by DEFAULT TRUNC (sysdate)

    , p_public_holidays in CHAR DEFAULT 'Y '.

    ) RETURN NUMBER

    DEFINE AUTHID

    AS

    /*********************************************************************/

    / * Author: Bruno Vroman * /.

    / * Created: 23-AUG-2012 * /.

    / * Last updated: 23-AUG-2012 * /.

    / * Object: to calculate the number of days between 2 dates, to the exclusion of * /.

    / * Saturday and Sunday, but also "holidays" If the * /.

    / * argument 'p_public_holidays' = 'Y ' * /.

    / * Support: p_date_from<= p_date_to                             ="">

    / * component ' hour min dry "ignored (just counting days) * /.

    /* First step:                                                       */

    / * the calendar days between 2 days * /.

    / Remove 2 days for each "week" and 0 or 1 extra day * /.

    / * function to a condition "complex" mix day of first week * /.

    / * and the number of days when full remaining weeks are removed * /.

    / * (set up once for all, for example if there is 3 days and the * /)

    (/ * first day is a Thursday, there is 1 "Sat/Sun" to subtract) * /.

    / * Second step: If 'p_public_holidays' = 'Y': other * /.

    / * days, do not count holidays.                         */

    / Holiday everyday are defined in a table "public_holiday" * /.

    / * Note: there may be holidays defined on Saturday/Sunday.       */

    /*********************************************************************/

    l_result NUMBER;

    l_from DATE;

    l_to DATE;

    l_case tank (4);

    BEGIN

    l_from: = TRUNC (p_date_from);

    l_to: = TRUNC (p_date_to);

    l_case: = TO_CHAR (l_from, 'Dy', 'NLS_DATE_LANGUAGE = English').

    To_char (MOD (l_to - l_from + 1, 7));

    l_result: = l_to - l_from + 1

    -TRUNC ((l_to-l_from + 1) / 7) * 2

    -CASE

    WHEN l_case IN ('Mon6', 'Tue5', 'Wed4', 'Thu3', 'Fri2'

    , "Sat1", "Sun1", "Sun2', 'Sun3", "Sun4".

    , "Sun5', 'Sun6.

    )

    THEN 1

    WHEN l_case IN ('Tue6', 'Wed5', 'Wed6', 'Thu4', "Thu5"

    , 'Thu6', 'Fri3', 'Fri4', 'Fri5', 'Fri6 '.

    , "Sat2", "Sat3', 'Sat4', 'Sat5", "Sat6.

    )

    THEN 2

    0 OTHERWISE

    END

    ;

    IF SUPERIOR (p_public_holidays) = "Y".

    THEN

    SELECT l_result - COUNT (*)

    IN l_result

    OF public_holiday p

    WHERE p.calendar_day > = l_from

    AND p.calendar_day<=>

    AND SUBSTR (TO_CHAR (p.calendar_day

    , "Dy".

    'NLS_DATE_LANGUAGE = English'

    )

    , 1, 1 ) != 'S'

    ;

    END IF;

    RETURN l_result;

    EXCEPTION

    WHILE OTHERS

    THEN

    DBMS_OUTPUT. Put_line (' CTF nb_days (' |))

    To_char (p_date_from, "MON-DD-YYYY"). ', ' ||

    To_char (p_date_to, "MON-DD-YYYY"). ', ' ||

    p_public_holidays | ' ) : ' || SQLERRM

    );

    LIFT;

    END nb_days;

    /

    REM

    REM example:

    REM A) fill out the 'public_holidays '.

    REM

    TRUNCATE TABLE public_holiday;

    INSERT INTO public_holiday VALUES (DATE ' 2012-01-01', ' new year (a Sunday)');

    INSERT INTO public_holiday VALUES (DATE '' 2012-01-03, "for example");

    REM (insert other days...)

    COMMIT;

    Call the function for some pairs of dates of REM B)

    REM nb1: remove only Sat/Sun

    REM nb2: also remove holidays

    REM

    ALTER SESSION SET nls_date_format ='Dy DD-MON-YY';

    WITH some_dates AS

    (SELECT DATE ' 2011-12-29'd dual FROM

    UNION ALL SELECT DATE ' 2012-01-08' FROM dual

    UNION ALL SELECT DATE ' 2012-01-10' FROM dual

    )

    SELECT d1.d 'FROM '.

    , d2.d ' to THE '.

    , nb_days (d1.d, d2.d, ' don't) nb1

    , nb_days (d1.d, d2.d, 'Y') nb2

    OF some_dates d1

    some_dates d2

    WHERE d1.d<=>

    ORDER BY nb1, nb2, d1.d

    ;

    GO TO NB1 NB2

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

    Monday, January 8, 12 Monday, January 8, 12 0 0

    Friday, December 29, 11 Friday, December 29, 11 1 1

    Wednesday, January 10, 12 Wednesday, January 10, 12 1 1

    Monday, January 8, 12 Wednesday, January 10, 12 2 2

    Friday, December 29, 11 Monday, January 8, 12 7 6

    Friday, December 29, 11 Wednesday, January 10, 12 9 8

    Hope that this could be useful, but note that this code has not been completely tested, so check and test before you trust it (in the case of any questions, please post a comment)

    Bruno Vroman.

    Best regards

    Bruno

  • ++ Adding the number of days to an existing date

    Hi team,

    Try to add the number of days to an existing date.

    Ex: If the date is May 28, 2012, I need to add 15 days. The deadline in the element should be June 12, 2012.

    How to handle this in Application Express 4.1.0.00.32.

    Would appreciate your answer by May 29, 2012.

    Thank you in advance.

    Kind regards
    Anitha

    What is the date format in the date picker? Maybe give example date value

    I guess it's something to your data format

    Look at this example of work

    http://Apex.Oracle.com/pls/Apex/f?p=46417:9

    login: test/test

    If your date format DD-MON-YYYY is then use this js code

    //define the array of month names
    var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
         "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
    var dateArray = $v('P2_WPTG_START_DATE').split("-");
    for (var i = 0; i < monthNames.length; i++) {
         if (monthNames[i] == dateArray[1]) {
              var vmonth = i;
              dateArray[1] = vmonth;
         }
    
    }
    var d = new Date(dateArray[2], dateArray[1], dateArray[0]);
    //convert the string into date
    d.setDate(d.getDate() + 15);
    // add 15 days
    var newDate = (d.getDate()) + "-" + monthNames[d.getMonth()] + "-" + d.getFullYear();
    $s('P2_PLANNED_RELEASE_DATE',newDate);
    
  • SQL query to get the number of days monthwise

    Hello
    I'm new to sql, can someone please tell me query to find the number of days between the two dates months wise.
    say
    FIRSTDATE last date
    21/03/2011-25/06/2011

    March April May June
    9 22 23 18

    Hello

    Welcome to the forum!

    Here's one way:

    WITH     all_dates     AS
    (
         SELECT     start_date + LEVEL - 1     AS a_date
         FROM     (
                   SELECT     TO_DATE ('21/03/2011', 'DD/MM/YYYY')     AS start_date
                   ,     TO_DATE ('25/06/2011', 'DD/MM/YYYY')     AS end_date
                   FROM     dual
              )
         CONNECT BY     LEVEL     <= end_date + 1 - start_date
    )
    SELECT       TO_CHAR ( TRUNC (a_date, 'MONTH')
                , 'fmMonth YYYY'
                )               AS month
    ,       COUNT (*)               AS num_days
    FROM       all_dates
    WHERE       a_date - TRUNC (a_date, 'IW')     < 5
    GROUP BY  TRUNC (a_date, 'MONTH')
    ORDER BY  TRUNC (a_date, 'MONTH')
    ;
    

    What is a 'working day '? I guess you mean every day except Saturday or Sunday, but the query aboveare sometimes figures less than you have asked:

    MONTH             NUM_DAYS
    --------------- ----------
    March 2011               9
    April 2011              21
    May 2011                22
    June 2011               18
    

    Are a few days working on Saturday or Sunday? How do you get the 22 working days in April 2011 and 23 in may?

    SQL is good at obtaining results with a variable number of rows, but you have to say exactly the desired number of columns when you write the query.
    If you really need the output of the way you said, with any number of columns, then watch in swing or a grouping of the chain . See the FAQ forum
    https://forums.Oracle.com/forums/Ann.jspa?annID=1535
    "4. How can I convert rows to columns.

  • How can I convert a part of the day at once?

    How to convert a part of the day in one hour, without dividing and modding the number myself?

    For example, I calculated the noon solar UTC for etre.733409047. Adding the date gives the correct answer:

    SQL > SELECT TO_DATE (' 01 / 01/2012 ', ' DD/MM/YYYY') +.733409047 FROM Dual;

    TO_DATE (' 01 / 01/2012 ',)
    -------------------
    01/01/2012-17:36:07

    A few questions to really understand this.

    .733409047 is implicitly converted? If so, what kind of data?
    If I want to HH should be converted to a date, then TO_CHAR? Or the comma directly convert?

    Currently, I'm trying to understand the INTERVAL.

    SQL > select interval '. 5' double day.
    Select the interval '. 5' double day
    *
    ERROR on line 1:
    ORA-01867: the interval is invalid

    So I'm obviously interpreting. Can it be used here?

    Hello

    Brian Tkatch wrote:
    How to convert a part of the day in one hour, without dividing and modding the number myself?

    For example, I calculated the noon solar UTC for etre.733409047. Adding the date gives the correct answer:

    SQL > SELECT TO_DATE (' 01 / 01/2012 ', ' DD/MM/YYYY') +.733409047 FROM Dual;

    TO_DATE (' 01 / 01/2012 ',)
    -------------------
    01/01/2012-17:36:07

    A few questions to really understand this.

    .733409047 is implicitly converted? If so, what kind of data?

    No, there is no conversion going on here, just the Arithmetic of Date .
    In Oracle, if d is a DATE and n is a NUMBER (not necessarily a whole and not necessarily positive), j + n is the DATE is n days later than d.

    If I want to HH should be converted to a date, then TO_CHAR? Or the comma directly convert?

    Sorry, I don't understand. Do you mean you want to do something like arithmetic dates, but instead to use a number comme.733409047 (which means environ.73 of a day), you want to pass a string as 17: 36:07' (i.e. 17 hours, 36 minutes and 7 seconds)? If so, INTERVAL DAY TO SECOND is probably your best choice. (It seems that you are already thinking in this direction.)

    Currently, I'm trying to understand the INTERVAL.

    SQL > select interval '. 5' double day.
    Select the interval '. 5' double day
    *
    ERROR on line 1:
    ORA-01867: the interval is invalid

    So I'm obviously interpreting. Can it be used here?

    You can only use integers like that. If you want any number, use arithmetic to date to add (or subtract) a DATE or use NUMTIDSINTERVAL to produce an INTERVAL DAY TO SECOND:

    SELECT     NUMTODSINTERVAL (.733409047, 'DAY')     AS intrvl
    FROM     dual;
    

    Output:

    INTRVL
    ------------------------------------------------
    +000000000 17:36:06.541660800
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and INSERT statements), maybe 5 rows and also post the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

Maybe you are looking for

  • error 7 in open TDMS

    I'm running this basic VI data acquisition which gives me "Error 7-open TDMS". I tried different variations of the name of file, fast, but it did not help. Also called this link http://forums.ni.com/ni/board/messageboard.id=170&thread.id=440033&view=

  • smoethings happened to my pen!

    To cut a long story short, I can't write properly because my pen registers before touching the screen (a few millimetres above). This means that it does not recognize my lifting pen actually go to the page and everything meets everything simply. I th

  • Can I update to 10 32-bit of Windows if I run Windows 7Pro 64-bit?

    I trust currently some fairly old legacy 16-bit software and I can run on 7 Pro x 64 with XPMode - a bit of a pain, but it is essential software, so I do what I do... I had someone test install and it works on their Windows 10... they have x 64 proce

  • Windows Media Player is unable to store settings of library management

    Everytime I open WMP a message in the lower bar tells me THAT WMP is update of libraries of music, video and photo. This slows down my computer and WMP lock causes. I don't want my music library updated, I go to libraries to manage and delete address

  • BBM how can I attach a photo stored on the iPhone!

    How to attach a photo to my message in BBM. I use an iPhone 4S.I see how to join a photo that I take at this time, but no option to attach existing pictures