DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: add 5 minutes to date field

  1. #1
    Join Date
    Nov 2000
    Posts
    57
    I have two date fields in one of my table:
    Test_Date_1 and Test_Date_2
    I need to add 5 minutes to Test_Date_2 field. (Test_Date_1 + 5 minutes)

    Could anybody send me correct UPDATE SQL example which can do this?

    thanks!

  2. #2
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    You can add 5 minutes to the sysdate from dual using this:

    select to_char(sysdate + (3/864), 'DD-MON-YY:hh.mi.ss') from dual;

    86400 seconds in a day. 300 seconds in five minutes. So add

    300/86400 to one day.

    Hope that helps.
    David Knight
    OCP DBA 8i, 9i, 10g

  3. #3
    Join Date
    Feb 2001
    Posts
    41
    that was very slick,,
    good input
    Best Regards,
    Harsh Shah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width