Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008

    Unanswered: adding date and time


    i wanna add sysdate and time which is stored in our table.
    the time is stored with varchar2 data type

    cutofftime is the column having time
    03:12:10 am

    i want to add sysdate + cutofftime
    for eg sysdate is 12/10/2008 and cut off time is 03:12:10 am then the output should be
    12/10/2008 03:12:10 am

  2. #2
    Join Date
    Jun 2004
    Liverpool, NY USA
    TO_DATE(to_char(sysdate,'mm/dd/yyyy')||cutofftime,'MM/DD/YYYY HH:MI:SS AM')

    In the future, store time as a number (seconds from midnight) or as a date. Storing it as a varchar2 is not a good idea.
    Last edited by beilstwh; 12-23-08 at 11:59.
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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