Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Posts
    36

    Unanswered: Substracting two timestamp columns

    Hi friends,

    i have one serious issue that has to be sorted out soon,

    I need to substarct two timestamp columns and need to get the result.
    The requirement is just like substarct two timestamp columns.
    Ex:
    (1999-04-14 12:12:12) - (2009-02-15 12:12:12)

    any help, advice from anyone will be appreciated

    Warm Regards
    junaid

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    BTW - IMO what you posted were not TIMESTAMP, but DATE datatypes.

    Code:
      1  select to_date('2009-02-15 12:12:12','YYYY-MM-DD HH24:MI:SS') -
      2	    TO_DATE('1999-04-14 12:12:12','YYYY-MM-DD HH24:MI:SS') INTERVAL
      3* FROM DUAL
    SQL> /
    
      INTERVAL
    ----------
          3595
    difference UNIT of Measure is DAYS
    Last edited by anacedent; 02-10-12 at 13:41.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2012
    Posts
    36

    Thanks u

    Ur Solution Helped me bro.!!
    Thx a lot

Posting Permissions

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