Add minutes to date

I have a form in which I have to add the date value to time.
i.e. I have a variable that stores date in the format 'DD-MON-RRHHMIPM'
To this value of date, I have to add time which is stored in an other variable in the format 'HH24MI'.
I can do this using INTERVAL on SQL PLUS, but how can I do it in forms9i?
p.s. Please save me from fractional calculations, i.e. convert time to fraction of hours.
Edited by: Sheel on Nov 17, 2008 3:10 AM

With dates, the unit (1) represents one day. So one hour is 1 /24 and one minute is 1/24/60, and so on.
If you want to add ten minutes to a date:
select sysdate, sysdate + (10 * (1/24/60)) from dual;Francois

Similar Messages

  • How to add minutes to date in java

    I have date in string variable, i have to add/subtract minutes from it, please adivce , how i could do in java 1.5
    sample data
    String olddate = "12/16/2010 4:58:29 PM"
    String minutes1 = "300"
    i would like to get value as below for above data
    String newdate ="12/16/2010 9:58:29 PM"

    Use SimpleDateFormat to convert the date object to string. Once the string object converted to date object use the getTime() method to get the date in milliseconds.
    Now you can easily adds/substract the date object.
    Remember, the resulting long value from getTime() method is in milliseconds, to get the value in minutes you need to multiply it by 1000 and by seconds in a minutes, that is 60.
    When your subtraction/adds done convert it back to date object.
    This is the codes:
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    import java.util.Date;
    public class DateCalculator {
         public static void main(String[] args) throws ParseException {
              String olddate = "12/16/2010 4:58:29 PM";
              System.out.println("old Date: "+olddate);
              SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm:ss a");
              long oldDateInMillis = formatter.parse(olddate).getTime();
              String minutes1 = "300";
              String newDateAdds = formatter.format(new Date(oldDateInMillis + Long.valueOf(minutes1)*1000*60 ));
              String newDateSubstract = formatter.format(new Date(oldDateInMillis - Long.valueOf(minutes1)*1000*60 ));
              System.out.println("new Date [Additions] : "+newDateAdds);
              System.out.println("new Date [Substraction] : "+newDateSubstract);
    }

  • Add Minutes to Date Time Stamp in Select Query

    Hi,
    I have date in one column and Minutes (240,480,.....etc) in another column.
    Below is the date format which i select in select query, now how should i add date column below with Minutes Column.
    to_char(Last_update_date,'DD/MM/YYYY HH:MI:SS AM')
    Thanks
    Pravin

    892547 wrote:
    Hi,
    I have date in one column and Minutes (240,480,.....etc) in another column.
    Below is the date format which i select in select query, now how should i add date column below with Minutes Column.
    to_char(Last_update_date,'DD/MM/YYYY HH:MI:SS AM')
    Thanks
    Pravinyou can NOT add to character datatype.
    what datatype is MINUTES column?

  • Add Minutes to a Timestamp column

    Hello there,
    I need to know how to add minutes to a timestamp column in APEX. I was looking for an answer on the internet but the DATEADD function doesn't work in APEX. Any ideas?
    Ruben

    DATEADD is a SQL Server function.
    I think using [interval data types|http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/sql_elements001.htm#i78291] and the NUMTODSINTERVAL function produces the clearest code:
    with ts_example as (
      select ename, cast(hiredate as timestamp) hirets from emp)
    select
              ename
            , hirets
            , hirets + interval '90' minute as intlit
            , hirets + numtodsinterval(90, 'minute') as numtodsint
    from
              ts_example
    ENAME      HIRETS                    INTLIT                    NUMTODSINT               
    SMITH      17-DEC-1980 00.00.00.00   17-DEC-1980 01.30.00.00   17-DEC-1980 01.30.00.00  
    ALLEN      20-FEB-1981 00.00.00.00   20-FEB-1981 01.30.00.00   20-FEB-1981 01.30.00.00  
    WARD       22-FEB-1981 00.00.00.00   22-FEB-1981 01.30.00.00   22-FEB-1981 01.30.00.00  
    JONES      02-APR-1981 00.00.00.00   02-APR-1981 01.30.00.00   02-APR-1981 01.30.00.00  
    MARTIN     28-SEP-1981 00.00.00.00   28-SEP-1981 01.30.00.00   28-SEP-1981 01.30.00.00  
    BLAKE      01-MAY-1981 00.00.00.00   01-MAY-1981 01.30.00.00   01-MAY-1981 01.30.00.00  
    CLARK      09-JUN-1981 00.00.00.00   09-JUN-1981 01.30.00.00   09-JUN-1981 01.30.00.00  
    SCOTT      19-APR-1987 00.00.00.00   19-APR-1987 01.30.00.00   19-APR-1987 01.30.00.00  
    KING       17-NOV-1981 00.00.00.00   17-NOV-1981 01.30.00.00   17-NOV-1981 01.30.00.00  
    TURNER     08-SEP-1981 00.00.00.00   08-SEP-1981 01.30.00.00   08-SEP-1981 01.30.00.00  
    ADAMS      23-MAY-1987 00.00.00.00   23-MAY-1987 01.30.00.00   23-MAY-1987 01.30.00.00  
    JAMES      03-DEC-1981 00.00.00.00   03-DEC-1981 01.30.00.00   03-DEC-1981 01.30.00.00  
    FORD       03-DEC-1981 00.00.00.00   03-DEC-1981 01.30.00.00   03-DEC-1981 01.30.00.00  
    MILLER     23-JAN-1982 00.00.00.00   23-JAN-1982 01.30.00.00   23-JAN-1982 01.30.00.00  
    14 rows selected

  • Add minutes to a day

    Hi,
    I have a requirement to add minutes to a day.
    For e.g the input parameters will be date(10/10/2006) + time(10:22:36) + mins(480) and the output has to be date + time.
    I tried to use the function module "CATT_ADD_TO_TIME"  ...but seems the end time is not calculated correctly.
    Thanks again,
    Rajib

    Hi Rajib Das,
                    Please see the following code
    DATA : MYDT LIKE SY-DATUM.
    CALL FUNCTION 'CATT_ADD_TO_TIME'
      EXPORTING
        idate         =  vbdkl-wadat_ist " 20060731
        itime         =  v_transittime  "     240000 (having 5 spaces before)
        stdaz         =  0
    IMPORTING
       EDATE         = MYDT
    Iam getting error as
    <b>
    The call to the function module "CATT_ADD_TO_TIME" is incorrect:                                                                               
    The function module interface allows you to specify only fields                 
    of a particular type under "ITIME". The field "'24:00:00'" specified here       
    has a different field type.                                                     </b>                                                                               
    Can you please rectify my error
                                                                                    Ranjith

  • How do I add to my data plan on the iPad once I have run out of time and no longer have an internet connection?

    How do I add to my data plan on the iPad once I have run out  and no longer have an internet connection? I am working out of the country and got a message that I was running low,followed immediatly by a you're out message.

    Should you not be asking your carrier? They are the people supplying your data plan.

  • Automatically add a current date at the end of the comments

    Hi,
    I have a form on a table with 5 fields... on one the field I am asking my users to enter comments...
    I am looking for a functionality to automatically add a current date at the end of the comments, only when they are updated or newly filled in...
    Please advice how can I do it... I am anticipating some sort of a trigger on column (when the data is modified)...
    Thanks

    automatically add a current date at the end of the comments, only when they are updated or newly filled inDo you want to add the date to the page item itself and hence show it to the end user as and when its changed, thn
    Assuming comments item is named '*P1_COMMENTS* , add the following to the "execute on load"
    $('P1_COMMENTS').change( function(){
      var d = new Date();
      $s('P1_COMMENTS', $v('P1_COMMENTS')+ d.toUTCString() );
    });If its to be done only when updating ie in the PLSQL block
    UPDATE <table name>
    SET <comments _column> = (  SELECT DECODE(  NVL(<comments _column>,'')
                                                                          ,NVL(:P1_COMMENTS,'')
                                                                          ,<comments _column>
                                                                          ,:P1_COMMENTS||TOCHAR(SYSDATE,'DD-MON-YYY')
                                                  FROM DUAL
    WHERE <condition>

  • How to add a new data type of oracle to SIM(7.0)

    Hi........
    I need to add a new data type(CLOB) to SIM of oracle .can anyone tell me how to modify or add this new data type.
    Any pointers to this will be highly appriciated.......
    thax in advance...

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?

    List and table controls -> listbox..is that what you are thinking of?
    The listbox presents the user with a list of options, and you can set it to only accept one selection at a time...Adding new data to the list can not be done directly by the user but if you make e.g. a text control and a button you can programatically insert new objects described in the text box when the button is pressed...(see example).
    If you need more than one column you have the multicolumn listbox. If you want the users to write new entries directly yu can use a table and read selected cells using it's selection start property to read what cell has been selected.
    MTO
    Attachments:
    Listbox_example.vi ‏34 KB

  • HT201401 I can't add a contact or edit contacts the little + sign is no longer on my phone...same thing on my iCalendar.  I can no longer add events or dates.  how do I fix this?

    I can't add a contact or edit contacts the little + sign is no longer on my phone...same thing on my iCalendar.  I can no longer add events or dates.  how do I fix this?

    Reset your phone, hold the home and off button down until the apple symbol comes up. If that doesnt fix it then you need to restore your phone in itunes, Connect to itunes, right click on your phones name to the left, then click restore from backup. That providing you have backed up your phone recently.

  • How do I add the capture date and time to the bottom corner of a photo?

    How do I add the capture date and time to the bottom corner of a photo?

    Not to the bottom, that I'm aware of, but to the top right or left in Grid view or to the top left in Loupe view. It is in the View Options.

  • How to add more summary data in the MIP of Compensation workbench

    Hi all,
    In the MIP (incentive plan) of the compensation workbench, we need to add more summary data in the summary section. I checked that all the summary data in that section are stored in the table 'ben_cwb_summary'.
    Even we can change the VIEW object for that page (using extension), we can't retrieve it because the new summary data/information we need to add are not stored in the table 'ben_cwb_summary'. We need to write our query to summerize data.
    How to implement it?
    Thanks in advanced!
    Jane

    faiz2000 wrote:
    > How to add more one record in the same time?
    >
    > Please I need your help to add more one record in the
    same time, how can I do
    > that?
    >
    > I have only one text field and the value it is linked
    from other table, if
    > user he bushes bottoms the all data it will copy it to
    new record:
    >
    > Ex.: <input name="textfield" type="text"
    >
    value="<%=(Recordset1.Fields.Item("webgroup").Value)%>">
    >
    >
    Use "Repeat Region"
    Mick

  • How do I get numbers to automatically add the next date down a column in numbers?

    How do I get numbers to automatically add the next date down a column in numbers?

    Hi Dd,
    If you want the next date automaitcally  filled in when you add a row to the bottom of the table, you can use a formula.
    Here's an example, done in Numbers 2.3 (Numbers '09). The method is basically the same in Numbers 3.
    Formulas in row 3:
    B3: =B2+1
    C3: =C2+7
    D3: =D2+14
    These have been filled down to the last row of the table.
    The same table is shown below after three rows have been added by dragging the Row control handle (below the tab for row 7) down. No changes other than adding thse three rows were made by the user.
    Note that rows 1 and 2 are header rows, and that row 2 contains the starting date for the seraies of date in each column. In the formula, the number at the end tells Numbers how many days to add to the previous date to get the next date.
    Autofill of the formula requires that every non-header cell located above the cell into which the formula is to be filled contains the same formula.
    Regards,
    Barry

  • I want to add image in column is it possible then how to add image in data base what data type we need to do

    I want to add image in column is it possible then how to add image in data base  what data type we need to give we required any casting  please show me one example
    jitendra

    Hi again,
    Several points that can help more:
    1. If you are working with Dot.Net, then I highly recommend read the first link that you got! This is nice and simple coding. Another option is this link which is even better in my opinion:
    http://www.dotnetgallery.com/kb/resource21-How-to-store-and-retrieve-images-from-SQL-server-database-using-aspnet.aspx
    2. As i mention above both link use the column's type image. There are several other option of working with Files. In most of my applications architecture I find that it is better to use a column which let us use any type of file and not an image column.
    In choosing the right column's type for your needs basically your fist question should be if if you want to store your data inside relational database environment or outside relational environment. It is a good idea to look for blogs on this issue. Next
    if you chose to store your data inside then you need to chose the right column type according to your server version. I highly recommend to look for blogs on the differences between those column's types: IMAGE, 
    Check those links:
    To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem
    http://research.microsoft.com/apps/pubs/default.aspx?id=64525
    FILESTREAM feature of SQL Server 2008
    http://msdn.microsoft.com/library/hh461480
    FileTables feature of SQL Server 2012
    http://technet.microsoft.com/en-us/library/ff929144.aspx
    Compare Options for Storing Blobs (SQL Server)
    http://technet.microsoft.com/en-us/library/hh403405.aspx
    Binary Large Object (Blob) Data (SQL Server)
    http://technet.microsoft.com/en-us/library/bb895234.aspx
    Managing BLOBs using SQL Server FileStream via EF and WCF streaming
    * Very nice tutorial!
    http://petermeinl.wordpress.com/2012/02/20/managing-blobs-using-sql-server-filestream-via-ef-and-wcf-streaming/
    [Personal Site] [Blog] [Facebook]

Maybe you are looking for

  • Sending empty files using SFTP Adapter

    I am trying to send empty files using SFTP adapter. The interface has to send the file whether its empty file or containing data using SFTP adapter. I am using BizTalk Server 2013 R2. Is it a bug or the hotfix is already there for this issue.

  • Problem with substring or println

    Hi, I have the following code, and it basically is looking for text between <title></title> tags. I use substring to grab the code between the two tags, and debugging shows it is correct. However, when I output it, my code stops and I just have white

  • IPod Mini ~Major Problem

    Ive had my iPod Mini for 2 years roughly I think now and havent had any major problems at all. Yesterday its started playing songs without my touching any buttons and skipping to the next song in exactly the same place as the one before started ~ 2.0

  • Printer prints one page

    When i print a document, it prints only the first page, then i try to print something else and it takes the paper in but doesn't print it. i have to cancel printing, printer returns the blank paper it took in for printing, i turn off my printer then

  • TS 4.0.1/CVI 8.5:Great River Tech Driver Fails with Teradyne M920

    I have an application that I developed that uses 2 Great River Technology (GRT) PCIe cards (for hotlink video data) and a Teradyne M920 (pattern generator/logic analyzer) running in a VXI chassis.  The development platform is WindowsXP, LabWindowsCVI