Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2008
    Posts
    94

    Unanswered: Finding Time Difference Using Varchar Column

    COLUMN1(VARCHAR(30)) COLUMN2(Varchar2(30))
    2009-07-29 13:01:31 2009-02-11 14:12:07

    i WANT TO GET DIFFERNCE OF THIS TWO COLUMNS AS TIME hh24:mmS FORMAT

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Code:
    to_date(column1, 'YYYY-MM-DD HH24:MI:SS') - to_date(column2, 'YYYY-MM-DD HH24:MI:SS')
    It's a very bad idea to store date information in a VARCHAR column.

Posting Permissions

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