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

Thread: Date field

  1. #1
    Join Date
    Nov 2000
    Posts
    416

    Question

    I want to add couple of minutes to a date field in a table. How can I do that? Thanks.

    Somthing like : New_date := to_char(hire_date) + '00:00:05'; ???




  2. #2
    Join Date
    Jun 2000
    Posts
    417
    When you do math with dates, it adds days. Eg,

    select sysdate + 1 from dual;

    Will give you tomorrow.

    If you want to add 5 minutes you'd have to do it as a fraction of a day. 24 hours in a day x 60 minutes an hour = 1440 minutes a day.

    select sysdate + 5/1440 from dual;

    will be 5 minutes ahead.

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