update a column with time stamp
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: update a column with time stamp

Hybrid View

  1. #1
    Join Date
    Jan 2001

    Thumbs down

    Assuming that I have a table that has a time stamp on column called time. And I want to update
    this column with date and time e.g (02/22/2001 and time is 1 :24 pm) how do I do that?

    2.What if I want update that same column with the same date but this time with
    sysdate instead of the specified time.

    Can any one please show me the syntax for these 2 examples?


  2. #2
    Join Date
    Feb 2000
    phoenix, AZ,USA

    Assuming that the column is of type 'date' - to update the column with a specific value you could say

    update table_name set column_name = to_date('02/06/2001 13:24:04', 'mm/dd/yyyy hh24:mi:ss') where .....

    To update with the sysdate, you could just say
    update ..... set column_name = sysdate where .....

    Hope this helps.

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