How to add days, hours, minutes and seconds to a date?

Hello

I have the following problem.
Saw 4 integers D, H, M, and S (each of them can be negative) and a date Da, I want to add days D, H hours, M minutes and seconds of S date Da.
For example, if
Da= to_date('28/06/2011 14:50:35','dd/mm/yyyy HH24:mi:ss'), and D = 3, H = -2, M = 20 and S = -12, 
This means that I want to add 3 days, -2 hours, 20 minutes and -12 seconds to the date Da, and the new date must be in the following date:
to_date('01/07/2011 13:10:23','dd/mm/yyyy HH24:mi:ss') 
Is it possible to write a query for this problem or should I use PL/SQL?

Thank you.

There is no need of PL/SQL

SQL> alter session set nls_date_format = 'DD/MM/YYYY HH24:MI:SS';

Session altered.

SQL> var d number
SQL> var h number
SQL> var m number
SQL> var s number
SQL> exec :d := 3; :h := -2; :m := 20; :s := -12

PL/SQL procedure successfully completed.

SQL> select to_date('28/06/2011 14:50:35','dd/mm/yyyy HH24:mi:ss')
  2     + :d
  3     + (:h / 24)
  4     + (:m / 24 / 60)
  5     + (:s / 24 / 60 / 60)
  6  from dual;

TO_DATE('28/06/2011
-------------------
01/07/2011 13:10:23

Tags: Database

Similar Questions

  • How to set the clock for the hours, minutes, and seconds with Windows XP

    How to set the clock for the hours, minutes, and seconds with Windows XP

    I don't know of your question.  If you ask how to show the clock in the tray system with hours, minutes and seconds, then download & run "Tclock Light".  Windows will not natively display the seconds.

    TClock Light: <> http://homepage1.nifty.com/kazubon/tclocklight/index.html >

    HTH,
    JW

  • A group of consecutive dates to get some absences (days, hours, minutes) and incidents

    Hello

    I'm trying to calculate and history of lack of list based on the details of lack follows.

    Here is what I got: (sorry for the dotted lines between the two, I put it just to format the data)

    EMP_ID - WORK_DT - PM - REASON - PAID
    =====-----=======------===-=====-- -- ====
    123---06/01/2009---8.0---malades---PAYE
    123---07/01/2009---8.0---malades---PAYE
    123---08/01/2009---8.0---malades---PAYE
    123---09/01/2009---8.0---malades---PAYE
    123---16/01/2009---8.0---FMLA EMP - paid
    123---17/02/2009---8.0---malades---PAYE
    123---18/02/2009---8.0---malades---PAYE
    123---30/03/2009---8.0---jure - paid
    123---21/05/2009---4.0---malades---PAYE
    123---22/05/2009---4.0---malades---PAYE
    123---03/07/2009---8.0---malades---PAYE
    123---25/08/2009---8.0---FMLA EMP - paid
    123---26/08/2009---4.5---FMLA EMP - paid
    123---21/09/2009---8.0---malades---non paid
    123---22/09/2009---8.0---malades---non paid


    I need to consolidate absences consecutive full day (8 hours) and show Start_dt, End_Dt, and also to calculate the duration of the absence in days, hours, min. If there is lack of half day (single or consecutive) is not followed by 8 hours, then they should be considered as a new incident (5/21 and 5/22). If the absence of half-day is followed by the absence of all day while they should be grouped together (8/25 and 8/26).

    So for the data mentioned above the result should look like:

    EMP_ID - START_DT - END_DT - DAYS - HOURS - minutes - INCIDENT - REASON - PAID
    ===---====== ---- ====== -- === - ==== - === - ====== - ====== -- -- =======
    123 4 06/01/2009-01/09/2009 - 0---0---1 - disease - paid
    123-16/01/2009 1-16/01/2009 - 0---0---2 - FMLA EMP - paid
    123 2 17/02/2009-02/18/2009 - 0---0---3 - disease - paid
    123 03/30/2009 1-30/03/2009 - 0---0---4 - Jury service - paid
    123 21/05/2009 0 - 21/05/2009 - 4---0---5 - disease - paid
    123 22/05/2009 0 - 22/05/2009 - 4---0---6 - disease - paid
    123 03/07/2009 1-2009-03-07 - 0---0---7 - disease - paid
    123-25/08/2009 1-08/26/2009 - 4-30-8 - EMP - paid FMLA
    123 21/09/2009-22/09/2009-2-0-0-9 - disease - unpaid

    I am able to group them to gether and get start_dt, end_dt and total days, hours as well as incident to help

    Work_Dt - Row_Number() over (order of MIN (Work_Dt) and)
    Row_Number() (order MIN (Work_Dt)

    but it includes absences consecutive half-day (5/21 and 5/22) together as a single incident that should be considered as separate incidents. any idea or help in this case will be a great help.

    Thank you

    Stéphane wrote:

    I'm trying to calculate and history of lack of list based on the details of lack follows.

    As promised:

    with t as (
               select 123 EMP_ID,to_date('01/06/2009','mm/dd/yyyy') WORK_DT,8.0 HRS,'Sick' REASON,'Paid' PAID from dual union all
               select 123,to_date('01/07/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('01/08/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('01/09/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('01/16/2009','mm/dd/yyyy'),8.0,'FMLA EMP','Paid' from dual union all
               select 123,to_date('02/17/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('02/18/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('03/30/2009','mm/dd/yyyy'),8.0,'Jury Service','Paid' from dual union all
               select 123,to_date('05/21/2009','mm/dd/yyyy'),4.0,'Sick','Paid' from dual union all
               select 123,to_date('05/22/2009','mm/dd/yyyy'),4.0,'Sick','Paid' from dual union all
               select 123,to_date('07/03/2009','mm/dd/yyyy'),8.0,'Sick','Paid' from dual union all
               select 123,to_date('08/25/2009','mm/dd/yyyy'),8.0,'FMLA EMP','Paid' from dual union all
               select 123,to_date('08/26/2009','mm/dd/yyyy'),4.5,'FMLA EMP','Paid' from dual union all
               select 123,to_date('09/21/2009','mm/dd/yyyy'),8.0,'Sick','Unpaid' from dual union all
               select 123,to_date('09/22/2009','mm/dd/yyyy'),8.0,'Sick','Unpaid' from dual
              )
    select  EMP_ID,
            MIN(WORK_DT) START_DT,
            MAX(WORK_DT) END_DT,
            TRUNC(SUM(HRS) / 8) DAYS,
            TRUNC(MOD(SUM(HRS),8)) HOURS,
            MOD(SUM(HRS),1) * 60 MINs,
            INCIDENT,
            REASON,
            PAID
      from  (
             select  EMP_ID,
                     WORK_DT,
                     HRS,
                     REASON,
                     PAID,
                     sum(start_of_incident) over(partition by EMP_ID order by WORK_DT) INCIDENT
               from  (
                      select  t.*,
                              case
                                when     lag(WORK_DT,1,WORK_DT) over(partition by EMP_ID order by WORK_DT) = WORK_DT - 1
                                     and
                                         lag(HRS,1,8) over(partition by EMP_ID order by WORK_DT) = 8
                                     and
                                         lag(REASON,1,REASON) over(partition by EMP_ID order by WORK_DT) = REASON
                                     and
                                         lag(PAID,1,PAID) over(partition by EMP_ID order by WORK_DT) = PAID
                                  then 0
                                else 1
                              end start_of_incident
                        from  t
                     )
            )
      group by EMP_ID,
               INCIDENT,
               REASON,
               PAID
      order by EMP_ID,
               INCIDENT
    /
    
        EMP_ID START_DT   END_DT           DAYS      HOURS       MINS   INCIDENT REASON       PAID
    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ------------ ------
           123 01/06/2009 01/09/2009          4          0          0          1 Sick         Paid
           123 01/16/2009 01/16/2009          1          0          0          2 FMLA EMP     Paid
           123 02/17/2009 02/18/2009          2          0          0          3 Sick         Paid
           123 03/30/2009 03/30/2009          1          0          0          4 Jury Service Paid
           123 05/21/2009 05/21/2009          0          4          0          5 Sick         Paid
           123 05/22/2009 05/22/2009          0          4          0          6 Sick         Paid
           123 07/03/2009 07/03/2009          1          0          0          7 Sick         Paid
           123 08/25/2009 08/26/2009          1          4         30          8 FMLA EMP     Paid
           123 09/21/2009 09/22/2009          2          0          0          9 Sick         Unpaid
    
    9 rows selected.
    
    SQL>  
    

    SY.

  • How to get the time in hours minutes and seconds subtraction between two varchar t

    Hi all

    I have two variable varchar that has a value like this

    v_outpunch1: = 17: 50:00'
    and v_Shifttime: = 18:00:00 '


    This time I'm subtracting here and in another varchar variable
    who's like that.



    v_EarlyLeaverstimeformat: = ((extrait extrait de (heure de TO_TIMESTAMP (v_ShiftTime, 'HH24:mi:ss'))-(heure de TO_TIMESTAMP (v_OutPunch1, 'HH24:mi:ss') LPAD)), 2, '0'): ': ' |)) LPAD ((extrait (minute de TO_TIMESTAMP (v_ShiftTime, 'HH24:mi:ss'))-extrait (minute de TO_TIMESTAMP (v_OutPunch1, 'HH24:mi:ss'))), 2, '0'): ': ' |)) LPAD ((extrait (seconde de TO_TIMESTAMP (v_ShiftTime, 'HH24:mi:ss'))-extrait (seconde de TO_TIMESTAMP (v_OutPunch1, 'HH24:mi:ss'))), 2, '0');))



    It is not properly subtracting value.

    Thank you

    This works for me...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as(select to_date('17:50:00','HH24:MI:SS') as out, to_date('18:00:00','HH24:MI:SS') as shft from dual)
      2  --
      3  select to_char(trunc(sysdate)+(shft-out),'HH24:MI:SS') as diff
      4* from t
    SQL> /
    
    DIFF
    --------
    00:10:00
    

    If you want something different, please report the details according to the FAQ: {message identifier: = 9360002}

  • DateValidator and inputFormat, I would check hour minute and second too

    Hi it is my will and I want to validate the whole date YYYYMMDD not only

    < mx:DateValidator id = "dateVal" source = "{TI_FechaInicio}" = 'text' property, inputFormat = "yyyy-mm-dd L:NN:SS" / >

    But it doesn't seem to work, so, how can I solve this?

    The only thing about work are yyyy-mm-dd, but (L:NN:SS A) none of the above work

    Yes, there's a RegExpValidator
    http://livedocs.Adobe.com/flex/201/langref/MX/validators/RegExpValidator.html

    I hope that you do not validate the date by using a regular expression, I mean you'd need one hell of a regexp to validate the fact that exactly the number of days in a month, at a few minutes to an hour, etc.

    I recommend you to read the doc "Creating and extending Flex components", it is a good example on how to make your own validator

  • Select the lists to the hours, Minutes and seconds

    Apex 3.2

    I need to create 3 selection lists.

    One for the hour (24 hours)

    One for the minutes

    One for seconds

    I couldn't just create selection lists in components that are shared using static values.

    Is there a way to get the values using a select statement?

    Gus

    Hello

    Try for example

    SELECT 0 + LEVEL AS HH24
    FROM DUAL
    CONNECT BY LEVEL <= 24
    

    Kind regards

    Jari

  • Hour, minute and second is missing when you use Row.getAttribute)

    Hello.

    JDeveloper 11.1.1.2

    If I do:

    SimpleDateFormat sdf = new SimpleDateFormat ("yyyy-MM-dd hh: mm");
    Line r = myRowSet.next)
    Date myDate = r.getAttribute ("arrival") (Date);
    System.out.println ("arrived:" + sdf.format (myDate));



    the exit time is always printed as 12:00, even though the time may 09:31.

    That is to say.
    Arrival: 2011-12-24 12:00

    Why?

    Best regards
    Erik

    Check the data type of the attribute in the EO and VO. If they are java.sql.Date you must change to the java.sql.Timestamp or oracle.jbo.domain.Date, which holds at the time and the date.

    Timo

  • Convert time difference in seconds in hours, minutes, and seconds

    Hi all

    I used the following logic to calculate the time difference between 2 passes of time for all the individual lines.

    (floor ((TIME_ACTIONED-TIME_ALLOCATED) * 24) |) ':' || MOD (Floor ((TIME_ACTIONED-TIME_ALLOCATED) * 24 * 60), 60) |': ' | MOD (Floor ((TIME_ACTIONED-TIME_ALLOCATED) * 24 * 60 * 60), 60))

    The user asked a column that displays the SUM of all the differences in time between the report.

    Any help much appreciated!


    Thank you
    Sweta

    Simply the sum of time_actioned - time_allocated, then do the same calculation you make on this sum.

    John

  • 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.

  • Show the average time in days hours minutes seconds

    Hello

    I have two tables as follows,

    Is it possible to separate the average time in days, hours, minutes, seconds.

    I need the average time required for each account.

    with
    Table1 as
    (select "AAA" acname, 123 tid, to_date (January 11, 15 13:00 ',' dd-mm-aa hh24:mi:ss') ltime Union double all the )
    Select 'AAA', 456, to_date (January 11, 15 15:00 ',' dd-mm-aa hh24:mi:ss') of all the double union
    Select 'BBB', 789, to_date (11 January 15 04:00 ',' dd-mm-aa hh24:mi:ss') of all the double union
    Select 'CCC', 990, to_date (11 January 15 18:00 ',' dd-mm-aa hh24:mi:ss') of all the double union
    Select 'BBB', 880, to_date (11 January 15 05:00 "," dd-mm-yy hh24:mi:ss') of all the double union
    Select 'DDD', 770, to_date (11 January 15 05:00 "," dd-mm-yy hh24:mi:ss') of all the double union
    Select 'BBB', 555, to_date (January 11, 15 13:00 ',' dd-mm-aa hh24:mi:ss') of double
    ),
    Table2 as
    (select txid 123, to_date (January 11, 15 14:00 ',' dd-mm-aa hh24:mi:ss') mtime of union double all the )
    Select 456, to_date (January 11, 15 16:00 ',' dd-mm-aa hh24:mi:ss') of all the double union
    Select 789, to_date (11 February 15 04:00 ',' dd-mm-aa hh24:mi:ss') of all the double union
    Select 770, to_date (11 February 15 07:00 "," dd-mm-yy hh24:mi:ss') of all the double union
    Select 990, to_date (11 January 15 23:30 ',' mm-dd-aa hh24:mi:ss') of all the double union
    Select 880, to_date (11 February 15 05:00 "," dd-mm-yy hh24:mi:ss') of all the double union
    Select 555, to_date (11 February 15 13:00 ',' dd-mm-aa hh24:mi:ss') of double
    )
    Choose acname, avg (hrs)
    from (select distinct t1.acname, (t2.mtime - t1.ltime) * 24 h )
    from table1 t1,
    Table2 t2
    where t1.tid = t2.txid
    )
    Group acname


    Expected results


    ACNAME Avg (day) APR (hrs) Avg (Mins) Avg (dry)

    AAA 0 1 0 0 (that is to say 14:00-13:00 = 1 and 16 15 = 1, Avg = (1 + 1) / 2 = 1)

    BBB          1               0          0               0

    CCC          0               5          30             0

    DDD          1               2          0               0

    with

    Table1 as

    (select 'AAA' acname, 123 tid, to_date (January 11, 15 13:00 ',' dd-mm-aa hh24:mi:ss') ltime Union double all the)

    Select 'AAA', 456, to_date (January 11, 15 15:00 ',' dd-mm-aa hh24:mi:ss') of all the double union

    Select 'BBB', 789, to_date (11 January 15 04:00 ',' dd-mm-aa hh24:mi:ss') of all the double union

    Select "CCC", 990, to_date (11 January 15 18:00 ',' dd-mm-aa hh24:mi:ss') of all the double union

    Select 'BBB', 880, to_date (11 January 15 05:00 "," dd-mm-yy hh24:mi:ss') of all the double union

    Select 'DDD', 770, to_date (11 January 15 05:00 "," dd-mm-yy hh24:mi:ss') of all the double union

    Select 'BBB', 555, to_date (January 11, 15 13:00 ',' dd-mm-aa hh24:mi:ss') of double

    ),

    Table2 as

    (select txid 123, to_date (January 11, 15 14:00 ',' dd-mm-aa hh24:mi:ss') mtime of union double all the)

    Select 456, to_date (January 11, 15 16:00 ',' dd-mm-aa hh24:mi:ss') of all the double union

    Select 789, to_date (11 February 15 04:00 ',' dd-mm-aa hh24:mi:ss') of all the double union

    Select 770, to_date (11 February 15 07:00 "," dd-mm-yy hh24:mi:ss') of all the double union

    Select 990, to_date (11 January 15 23:30 ',' mm-dd-aa hh24:mi:ss') of all the double union

    Select 880, to_date (11 February 15 05:00 "," dd-mm-yy hh24:mi:ss') of all the double union

    Select 555, to_date (11 February 15 13:00 ',' dd-mm-aa hh24:mi:ss') of double

    )

    Select acname,

    trunc (AVG (Days)) days,

    trunc (mod (AVG (Days), 1) * 24) hours,

    trunc (mod (AVG (Days) * 24.1) * 60) minutes.

    trunc (mod (AVG (Days) * 24 * 60.1) * 60) seconds

    from (select distinct t1.acname,(t2.mtime-t1.ltime) days

    FROM table1 t1,

    table2 T2

    where t1.tid = t2.txid

    )

    Acname group

    /

    ACN DAYS HOURS MINUTES SECONDS

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

    BBB         31          0          0          0

    CCC          0          5         30          0

    AAA          0          1          0          0

    DDD         31          1          0          0

    SQL >

    SY.

  • Countdown days, hours, minutes, seconds script

    Sure could use some help here.

    "RAT77" wrote in message news:[email protected]...
    > tralfaz
    > It was the only post I made the request. I would like to have the
    > actionscript that will be the countdown of the current date in days/hours/minutes/seconds to a
    > later date then displays a short message. I tried to use more
    > actionscript and all help to spoon feed me would be greatly appreciated.

    Oh, ok. I thought you were complaining that no one has been to help you with your previous question. It is useful to ask a
    issue.

    See if one of these messages can help you...
    http://tinyurl.com/l4wc4

  • A design of query for the conversion of time difference in days, hours, Minutes

    Hi all

    A design of query for the conversion of time difference of time in number of days remaining remaining hours minutes and rest in seconds. Made this one till now. Please suggest for all modifications, until now, it seems to work very well, kindly highlight for any anomaly.

    WITH DATA (startDAte, EndDate, Datediff) AS (SELECT to_date ('2015-10-01 10:00:59 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-20-01 03:00:49 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-10-01 10:00','yyyy-dd-mm hh24:mi:ss')-to_date('2015-20-01 03:00','yyyy-dd-mm hh24:mi:ss') FROM dual)

    UNION ALL SELECT to_date ('2015-10-01 10:00:39 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-20-01 03:00:40 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-10-01 10:00','yyyy-dd-mm hh24:mi:ss')-to_date('2015-20-01 03:00','yyyy-dd-mm hh24:mi:ss') FROM dual

    UNION ALL SELECT to_date ('2015-11-01 10:30:45 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-11-01 11:00:50 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-11-01 10:30','yyyy-dd-mm hh24:mi:ss')-to_date ('2015-11-01 11:00 ',' yyyy-mm-dd hh24:mi:ss') FROM dual

    UNION ALL SELECT to_date ('2015-11-01 09:00:50 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-11-01 10:00:59 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-11-01 09:00','yyyy-dd-mm hh24:mi:ss')-to_date ('2015-11-01 10:00 ',' yyyy-mm-dd hh24:mi:ss') FROM dual

    UNION ALL SELECT to_date ('2015-11-01 08:30:49 ',' yyyy-mm-dd hh24:mi:ss'), to_date ('2015-11-01 09:30:59 ',' yyyy-mm-dd hh24:mi:ss'), to_date('2015-11-01 08:30','yyyy-dd-mm hh24:mi:ss')-to_date('2015-11-01 09:30','yyyy-dd-mm hh24:mi:ss') FROM dual

    )

    Select

    trunc ((EndDate-StartDate)) days.

    trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24) hours)

    trunc (to_number (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24-trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24)) * 60) Minutes,))

    (to_number (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24-trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24)) * 60 - trunc (to_number (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24-trunc (((enddate-startdate)-to_number (trunc ((enddate-startdate))) * 24)) * 60)) * 60 seconds))))

    data;

    Thanks for the answers in advance.

    AHA!

    TO_TIMESTAMP expects a string as input, so it first makes an implicit conversion from DATE to a string, in the format of NSL_DATE_FORMAT.

    To convert the TIMESTAMP DATE independently NLS_DATE_FORMAT, use

    CAST ( AS TIMESTAMP)

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • How to add a pop-up window to set the date and time in a field

    How to add a pop-up window to set the date and time in a field? I know how to add the date. I create the field time with JavaScript event initialize like this:

    this.rawValue = num2date(date(), DateFmt(4));
    

    What I should change the script and the motive to do it properly.

    I changed the Format of data (object > link tab) date time but nothing happen. I want to set up a pop-up window as for the setting of date but with addition of time setting.

    Is this possible? Or that the date fixed like that? Should I get hour hand?

    Hello

    I don't think you will get both in the calendar popup. Basically, the popup calendar is the default behavior. It may be possible to develop a custom component, but it would take a bit of scripting and would probably not be worth the effort.

    I'd get the user to time manually entry in a separate field.

    Good luck

    Niall

  • How to add the chapter name and page not for reference

    Hello

    How to add the chapter name and page not for reference in indesign CS6.

    Thank you

    Please try variable notion of text

Maybe you are looking for

  • IPod Nano/Greyed out music

    Hi guys,. So I use an Ipod Nano 4th generation, but when it comes to connect to ITunes it just will not work. I use Windows 10 and you just download the new ITunes. My Ipod is recognized on ITunes, under devices but when I click on it to get my songs

  • Firefox won't download PDF files with javascript:doDownload();

    I just installed Firefox version 9.0.1, hoping that it would solve this problem, but no luck. My bank allows me to download and print my credit in the form of PDF files on their site. I checked the code and the button that I click implements a javasc

  • Satellite M60-139: separate the button until the middle of the lid

    Forum-friends Hello and greetings from cologne/Germany, I hope that I can describe my problem good enough to find same assistance if my bad English ;-) Yesterday, I recognized a torus (in German, it is called "Riss") in the cover (in German, we say "

  • Computer crashed... corrupt site... don't want Firefox to reopen it

    My wife went to a site that has threatened to damage the hard drive... She immediately went off hard... off the power... and subsequently restarted... wanted Open firefox again... and it took him back to the wrong page... If linking to make sure that

  • Guarantee Premium of MacMall screen

    I looked at the Premium screen warranty conditions and it indicates that the monitor must have been purchased directly from Dell. However, MacMall argues that panels they sell also fall within the Premium Dell screen warranty, as seen here (scroll do