Results 1 to 4 of 4

Thread: Timestamp

  1. #1
    Join Date
    Jun 2003
    Posts
    6

    Unanswered: Timestamp

    Hi,
    I am trying to insert the timestamp into a table with today's date and time. My query is like this.
    INSERT INTO EVENT_QUE (TRANSITION_TIMESTAMP) VALUES (TO_DATE(SYSDATE, 'DD-MM-YYYY HH24:MIS'))
    Some how it is inserting the time like this 26 June 0003 00:00:00 for all the times of that day. How can I insert in the format I want with the correct time?

    Thanks
    Lvm

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    dont forget sysdate is already of DATE type so you dont need to TO_DATE it.

    INSERT INTO EVENT_QUE (TRANSITION_TIMESTAMP) VALUES (SYSDATE);

  3. #3
    Join Date
    Jun 2003
    Posts
    6
    I am getting an error if I don't do TO_DATE.
    How can I insert in the format I want?


    Originally posted by AlanP
    dont forget sysdate is already of DATE type so you dont need to TO_DATE it.

    INSERT INTO EVENT_QUE (TRANSITION_TIMESTAMP) VALUES (SYSDATE);

  4. #4
    Join Date
    Jun 2003
    Posts
    6
    No I am sorry it is working fine Thanks very much.

    Lvm


    Originally posted by AlanP
    dont forget sysdate is already of DATE type so you dont need to TO_DATE it.

    INSERT INTO EVENT_QUE (TRANSITION_TIMESTAMP) VALUES (SYSDATE);

Posting Permissions

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