type conversion of numeric value in the time format

Hi guys,.
I have the column called need .i (time in seconds) to convert the numeric value of a column in time format HH. for example 3012 = 00: 50.12.
How can I proceed even in the front.


Thank you and best regards,
Nandu

Hi Nelly,

Pls go through the below formula:
This deffenitely will help you resolve the issue.

Concat (concat (concat (concat (cast (floor ((COLUMN_NAME) / 3600) as char), ':'), cast (floor (mod ((COLUMN_NAME), 3600) / 60) as char)),': '), cast (floor (mod (mod ((COLUMN_NAME), 3600), 60)) as char))

Thank you
Cognet

Tags: Business Intelligence

Similar Questions

  • sum of column that contains the values in the time format

    Hi all

    I give you a piece of my code below
    SELECT  dif.EMPLOYEE_NUMBER Employee#, dif.FULL_name EmployeeName,
     TO_CHAR(START_DATE,'dd-Mon-rrrr') DOJ ,dif.DEPT_NAME,POSITION , DATE_ENTRAY AttendanceDate,
    
     to_char(DATE_ENTRAY,'DY') day, TO_CHAR(LNE1,'hh24:mi')TimeIn1 ,TO_CHAR(LNE2,'hh24:mi')TimeOut1,
     
     TO_CHAR(LNE3,'hh24:mi')TimeIn2 ,TO_CHAR(LNE4,'hh24:mi')TimeOut2, TO_CHAR(LNE5,'hh24:mi')TimeIn3 ,
    
     TO_CHAR(LNE6,'hh24:mi')TimeOut3, to_char(decode(LNE8,null ,
    
     decode(LNE7,null, decode(LNE6,null, decode(LNE5,null, decode(LNE4,null, decode(LNE3,null,
    
     decode(LNE2,null,LNE2 ,LNE2 ),LNE3 ),LNE4 ),LNE5 ),LNE6 ),LNE7 ),LNE8 ),'hh24:mi')TimeOuts ,
     
     ACT_HOUR Work_Hrs, 
    
    decode(DLY_ABSENT_TYPE,'Late',DED_ABS ,'Late (Deduction)',DED_ABS,'00:00') Late_Hrs,ACT_OVT Over_Time
     FROM jjj_PUNCH_DATA_EMP_LIST trn , 
     jjj_emp_def dif,jjj_PUNCH_CARD_ELEG ele WHERE trn.EMPLOYEE_NUMBER =dif.EMPLOYEE_NUMBER and   
     ele.EMPLOYEE_NUMBER =trn.EMPLOYEE_NUMBER  and   DATE_ENTRAY between '23-Aug-2009' and  '24-Aug-2009' 
    
    I require to find the sum of column  wrk_hrs
    Act_hour or wrk_hrs belongs to table  jjj_PUNCH_DATA_EMP_LIST trn , and the datatype of act_hour is varchar(10 byte)
    the values of column act_hrs, (i require the sum of this column)
    08:00
    07:22
    06:08
    kindly help
    thanking in advance

    concerning
    Oracle user

    Hello

    Thanks for posting the CREATE TABLE and INSERT. That really helps.

    Do you want 19:33 ' as the output? Which makes it look like 19 hours and 33 minutes. Most people would represent 19.33 hours (i.e. 19 more than 1/3 hours) as 19:20 '. Should not the sum of
    ' x: 00 ' and
    'y: 20' be
    "z: 20?

    If you really want 19:33 ', see the solution of Hoek.

    If you really want 19:20 ', then you were on the right track.
    I think that you were trying to do:

    WITH  got_total_hours     AS
    (
         SELECT SUM (   TO_NUMBER (SUBSTR (act_hour, 1, 2))
                    + ( TO_NUMBER (SUBSTR (act_hour, 4, 2))
                      / 60
                      )
                    ) AS total_hours
         from      p
    )
    SELECT        TO_CHAR (FLOOR (total_hours))
           || ':'
           || TO_CHAR ( MOD (total_hours, 1) * 60
                   , 'fm00'
                   )     AS hh_mm
    FROM     got_total_hours
    ;
    

    Looks like you were trying calculate total_hours in a subquery, then use the total_hour alias in a query Super, which is quite accurate. You're just confused on how to write a subquery.
    There are two basic ways to write subqueries:

    (1) WITH clause:

    WITH  sub_query  AS
    (
         SELECT  ...
    )
    SELECT  ...
    FROM      sub_query
    ;
    

    (2) online review

    SELECT     ...
    FROM     (     -- Begin sub_query
         SELECT     ...
         )     -- End sub-query
    ;
    

    Looks like you tried a bit of each method.

    In most cases (this included problem) either one will work.
    Other problems are much easier by using a WITH clause and WITH clauses are usually easier to read and understand, I recommend that you always use a WITH clause rather than views online.

    You can also change the Hoek solution to get the result 19:20 ' without a subquery (or without using any expression complicated, more than once, which is the only reason why I have proposed a subquery). Since date arithmetic Oracle comes from the days, not hours, when the solution of Hoek has calculated the number of hours, you'll have to divide by 24 to get the number of days. If you are using TO_CHAR to fit the time, however, the results can be confusing if the total is 24 hours or more. You might be better off using NUMTODSINTERVAL.

  • I want to create a 2 cells in demand for numbers, the 1st cell is a dropdown menu with items of text, when choosing an item, that it would be represented by a numeric value in the other cell. How can I do?

    I want to create a 2 cells in demand for numbers, the 1st cell is a dropdown menu with items of text, when choosing an item, that it would be represented by a numeric value in the other cell. How can I do?

    You can use vlookup() like this:

    (1) crate a table like this:

    the first line is a heading row

    the first column contains the same list of items in the context menu

    the second column contains the corresponding values

    name of the table 'value '.

    In another table (where the pop-up menu), you can use the table of choice of 'Value' like this:

    create a drop-down list in cell B1

    Select cell C1 and type (or copy and paste) the formula:

    = VLOOKUP (B1, Value::A:B, 2, 0)

    short hand for this is:

    C1 = VLOOKUP (B1, Value::A:B, 2, 0)

    now change the pop-up to display the value in the change of cell C1

  • How to place numerical values on the peak in graphs

    Hello

    Is it possible to put the numerical value on the crest of the wave as in the below image where the yellow dots on the Ridge, we put value digital pic?

    It needs a lot of cleanup (and there are probably still have a better way in general), but it should at least help you get started.

    I used the Detector.vi Peak, which requires the LV Full Development System.

  • Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel?

    Is it possible to connect a simple 1 d array to a digital indicator or what would be the best way to display the numeric values of the array on the front panel? Examples or suggestions would be greatly appreciated.

    Thank you

    Tunis

    Thank you Adam, it's originally in a while loop, I placed it in a loop for example, wired County in the for loop and presto, this son of a digital indicator. It works very well. Thanks for the help folks.

  • Any graphical plugin, or other available solution of "CAPTURE a VALUE at THE TIME TO click ON?

    Hello

    I just realized that the query is not my problem.

    I have a graph that uses the query below, and it displays bars showing the 4 different totals revenue market Segment in every bar.

    My requirement is to drill down in this section of the graph and show what amounts to this total.

    I can't add this to the LINK because at the time of the request, the market Segment is unknown.

    Y at - it a graphic plugin, or other available solution that can of "CAPTURE a VALUE at THE TIME CLICK ON"?

    Select the NULL LINK,

    TO_CHAR (to_date (Year, 'YY'), 'YYYY') year.

    sum (decode (market_segment, Advanced Technology Facilities, recipes, 0)) 'Advanced Technology',

    sum (decode (Market_segment, "energy and environmental Technologies", recipes, 0)) 'energy and environment '.

    sum (decode ("market_segment, ' High Tech infrastructure", recipes, 0)) 'high technology Infrastructure. "

    sum (decode (market_segment, "Chemical and Life Sciences", recipes, 0)) 'Life Sciences and chemicals. "

    of apps.xxmwz_apex_rev_5yrs

    Group by year

    order by 1

    I think you just need to change your group clause

    of ' group by year, market_segment.

    for "group by to_char (to_date(year,'YY'), 'YYYY') , market_segment '.

    This is the request of my sample application

    select 'f?p=&APP_ID.:2:'||:app_session||'::::P2_MONTH,P2_STATE:'||trunc(DEMO_ORDERS.ORDER_TIMESTAMP,'MM') ||','||DEMO_CUSTOMERS.CUST_STATE||':' link,
           trunc(DEMO_ORDERS.ORDER_TIMESTAMP,'MM') year,
           case when DEMO_CUSTOMERS.CUST_STATE = 'VA' then sum( DEMO_ORDERS.ORDER_TOTAL) end as VA,
           case when DEMO_CUSTOMERS.CUST_STATE = 'MA' then sum( DEMO_ORDERS.ORDER_TOTAL) end as MA,
           case when DEMO_CUSTOMERS.CUST_STATE = 'GA' then sum( DEMO_ORDERS.ORDER_TOTAL) end as GA,
           case when DEMO_CUSTOMERS.CUST_STATE = 'IL' then sum( DEMO_ORDERS.ORDER_TOTAL) end as IL,
           case when DEMO_CUSTOMERS.CUST_STATE = 'NY' then sum( DEMO_ORDERS.ORDER_TOTAL) end as NY,
           case when DEMO_CUSTOMERS.CUST_STATE = 'MO' then sum( DEMO_ORDERS.ORDER_TOTAL) end as MO,
           case when DEMO_CUSTOMERS.CUST_STATE = 'CT' then sum( DEMO_ORDERS.ORDER_TOTAL) end as CT    
    
    from DEMO_ORDERS DEMO_ORDERS,
        DEMO_CUSTOMERS DEMO_CUSTOMERS
    where DEMO_ORDERS.CUSTOMER_ID=DEMO_CUSTOMERS.CUSTOMER_ID
    group by
    DEMO_CUSTOMERS.CUST_STATE,
    trunc(DEMO_ORDERS.ORDER_TIMESTAMP,'MM')
    
  • Add numeric value in the column in the Table

    Hello
    My problem:
    I have a VO with a numeric attribute (Sal). This VO is present in a table in a JSF Page.
    I need to add a numerical value to the value of the column.

    I have try it with #{row.bindings.Sal.attributeValue * 2} or #{rank. SAL + 2} or #{rank. Sal.inputValue + 2} but I get an error.

    Can someone help me?

    Thank you

    11.1.3 JDev

    Hello

    one option would be to use a transitional attribute in the VO to calculate math or to fill in the field column of a managed bean. You can point the field for the column to a property of the managed bean (say sumSal). In this getSumSal() method you

    1. use ELContext and ValueExpression ExpressionFactory to resolve the reference #{line} (you can cast oracle.jbo.domain.Row
    2. call the row.get ("attribute_name") to access the value of the field
    3 compute and return the value to display in the table

    Note that using a transitional attribute may be easier to achieve and easier to reuse in other uses of the VO. However, you will have options

    Frank

  • How to use the Type of Oracle Table values in the Select statement.

    Hello

    I get the initial set of values in the Table of Type Records of the Oracle and want to use the list of values in the Select statement.

    For example, try something like the following:

    TYPE t_record () IS RENDERING
    ID TABLEA.ID%type,
    NO TABLEA.NO%type

    );
    v_record t_record;
    T_table TYPE IS the v_record TABLE % TYPE;
    v_table t_table;

    -Code to fill the values of v_table here.

    SELECT ID, NO, COLLECT in BULK IN < some other table variabes here > FROM TABLEA
    WHERE ID IN (i) v_table USER.USER;

    I want to know how to use the Type of Oracle Table values in the Select statement.

    Something like this:

    create or replace type t_record as  object (
    id number,
    no number
    )
    /
    
    CREATE or replace type t_table AS TABLE OF t_record;
    /
    
    set serveroutput on
    declare
    
      v_table t_table := t_table();
      v_t1 t_table := t_table();
    
    begin
    
      v_table.extend(1);
      v_table(1).ID := 1;
      v_table(1).No := 10;
    
      v_table.extend(1);
      v_table(2).ID := 2;
      v_table(2).ID := 20;
    
      SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
      from TableA
      FROM TABLEA
      WHERE ID IN (select t.ID from table(v_Table) t);
    
      for i in 1..v_t1.count loop
        dbms_output.put_line(v_t1(i).ID);
        dbms_output.put_line(v_t1(i).No);
      end loop;
    end;
    /
    

    No test!

    P;

    Published by: bluefrog on March 5, 2010 17:08

  • How can I set the time format 24 hours instead of AM/PM lightning/en? Thank you very much!

    I want to configure lightning with the time format 24 hours rather than the AM/PM format, but cannot find it in the options. Thanks for the help!

    You will need to set it for your operating system. Lightning uses the format of the OS.

  • The time format

    Hello

    just a small comment on French and the time format: now, it is written in non-French format (0:00-12:00 a.m..) while in France, we use a time format 24 hours (0 h 00 - 24 h 00)

    Thanks for the comments. We relaierons this to our product team.

    Best,

    Socialcast VMware team

  • Error: Please enter the date value in the correct format DD-MON-RRRR

    Hi all
    First of all, I am 100% not learning financial oracle no technical information. I'm trying to run a report: - the calendar does not appear in order for me to choose the date - not to mention that when I enter the date IE 10/09/2010 or on 09/10/2010 the system gives me this error "" error: Please enter the date value in the correct format DD-MON-RRRR ".
    Please help me to solve this.

    Thank you

    Please enter date in format 12 October 2010.

    Kind regards
    http://www.oraerp.com

  • Data clean on a numeric value in the text field

    Hello team,

    There is a field called 'turnover' in our Eloqua instance. It is a text field, but contains mostly numeric values synchronized in the same field of SFDC. The SFDC field is numeric.

    I am trying to write a program of standardization of data that uses the "Annual sales" value to update another field, "standardized annual income", with the value appropriate for example Strip $0 to $5 M, $5 - $10 M, $10 / $20 M...

    I created a rule to update that search values:

    • between 1 and 5000000 "turnover" and updates the "standardized annual income" field of $0 à $5 M
    • between 5000001 and 100000 in the "Annual income" and updates the "standardized annual income" field $5-$10 M
    • and so on...

    However when I test it I get the correct value in 'annual standardized income. " I also tried using filters to make contacts with the "annual income" values between 0 and 5000000 but I get all kinds of values outside this range.

    Can someone tell me where I'm wrong? Is it because the data type of the field 'Turnover' is the text rather than digital? I guess I could create a new numeric field for "Annual income", write values existing in this area and change the SFDC integration but I would avoid it if possible. If anyone has any bright ideas, I'd love to hear them.

    Thank you

    James

    For anyone interested, I got the answer from the Support. As it is established as a text field that eloqua is trying to make an alphabetical "between" rather than a digital "between". As it is not possible to change the data type of a field, I need to create a new digital field, export the data to the existing field (as well as email address) and upload again to the new field.

  • need to "extract" a numerical value of the given XML node

    My question: -.
    of a document XML how can I 'extract' a numeric value for use in a "customized math expression" to convert inches into millimetres/centimetres dimensional data?

    FYI: -.
    When you use a component XML Connector that I am able to load and display the values of XML data, of my choice, the XML document required; the data is loaded into the components that are instances of TextArea or TextInput.

    background: -.
    in order to make use of the value of XML data I tried to assign it to an 'intermediate and temporary variable' using the ComponentInstanceName.text option in an assignment, but that effort failed, where this post.

    your comments: -.
    all comments, suggestions, ideas are received with gratitude; Please keep in mind that cindy I am a newb to XML format, but hope that change in the coming months.

    Thanks for your time.

    ... and so, I discovered that the main reason for my bad be able to access the data is due to the fact that the xml data is not fully charged in my application when my code is trying to access. of course it's because of the asynchronous loading of the Flash XML Connector component behavior.

    so the repair to the original message is:-
    check that the data is fully loaded into the app and only then access and assign it to all the other required variables.

    SORTING :)

  • Date value with the time to midnight

    Hi all
    I have a requirement where I have to insert the date in a DATE data type column. The requirement must have the value of time too. I have to insert dates with TIME as 000000hrs or 12:00. But I am unable to do so. Whenever I try, he inserts just the date. But if I try to 12:00:01 AM, it inserts. Anyone know why this is happening? Or how can I insert the desired values?

    PS: the table already contains data, and they have the time above mentioned format.

    Thank you
    Lucette

    It is purely a display issue, as others have said.

    When a date is stored in a DATE data type, there's always a component "hour".
    This is the front end of the GUI (like the TOAD) who can sometimes simply display the part of date if the time is 00:00:00.
    for example if we look into SQL * Plus, we can tell him how we want the date and time displayed...

    SQL> drop table x;
    
    Table dropped.
    
    SQL> create table x(d date);
    
    Table created.
    
    SQL> insert into x values (trunc(sysdate));
    
    1 row created.
    
    SQL> insert into x values (sysdate);
    
    1 row created.
    
    SQL> insert into x values (to_date('20/04/2009 00:00:00','DD/MM/YYYY HH24:MI:SS'));
    
    1 row created.
    
    SQL> select * from x;
    
    D
    ---------
    21-APR-09
    21-APR-09
    20-APR-09
    
    SQL> alter session set nls_date_format = 'DD-MM-YYYY HH24:MI:SS';
    
    Session altered.
    
    SQL> select * from x;
    
    D
    -------------------
    21-04-2009 00:00:00
    21-04-2009 10:19:18
    20-04-2009 00:00:00
    
    SQL> select d, dump(d) from x;
    
    D                   DUMP(D)
    ------------------- ----------------------------------------
    21-04-2009 00:00:00 Typ=12 Len=7: 120,109,4,21,1,1,1
    21-04-2009 10:19:18 Typ=12 Len=7: 120,109,4,21,11,20,19
    20-04-2009 00:00:00 Typ=12 Len=7: 120,109,4,20,1,1,1
    
    SQL>
    

    Here, you can see that if we inserted a trunc would date or explicitly a time of 00:00:00 with our date, then that time was properly stored on the database.

    Certainly a user interface issue. ;)

  • Take the last value of the timer

    Hello

    Looking for a help store the timer values.

    Set the backround: will be used to gather data for tests on mechanical switch lifecycle sump pumps.

    Needs to: number of cycles (lit-shut down-lit), Count time stuck we or off (authorized in time is the estimated time to fill/drain sump), see the amount of time stuck on or off.

    I got all of these features to work, but my problem is that when I save to spreadsheet each incriment stuck time power is saved. This could lead to a large number of unnecessary data points. Instead, I want only the last zero no value of the glued power saved timer.

    Any help is greatly appreciated.

    ~ Andrew

    Here ya go:

Maybe you are looking for