Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006
    Posts
    3

    Red face Unanswered: Update time into the "date" type field.

    I want to update time in the field which has data type DATE in oracle
    so how would i write a statement.

    I m updating the following command which is not working.


    update ord set recept_hh=to_char(200900,'hh24:mmS') where sampleid='0040022A';


    ------------- above example recept_hh -> is a date data type


    would u please helpe me


    Thank you a lot....
    Parikshit

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Presumably recept_hh already has a date in it that you don't want to change, so you need to include that in the new value:
    Code:
    update ord
    set recept_hh = to_date ( to_char(recept_hh,'YYYYMMDD')||'200900'
                            , 'YYYYMMDDHH24MISS')
    ...

Posting Permissions

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