Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2011
    Posts
    82

    Unanswered: The time difference between Concatenated fields

    Hello,

    Can someone kindly help me.

    How would I find the time difference between the concatenated fields LEFT_REC and INTO_REC in minutes

    The concatenated fields are a comnbination of date and time fields

    SELECT
    SESSION_START,
    SESSION_END,
    SESSION_START|| ' '|| INTO_RECOVERY AS INTO_REC,
    SESSION_START|| ' '|| LEFT_RECOVERY AS LEFT_REC
    FROM GRS

    How would I go about doing this?

    Many Thanks
    Helen

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Wink

    Quote Originally Posted by Helen Pippard View Post
    ... Etc ...
    The concatenated fields are a comnbination of date and time fields
    ...
    How would I go about doing this?
    You can use the TO_DATE() function to convert to a date and then just subtract one from the other.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Dec 2011
    Posts
    82
    Hello

    Thanks for your reply.

    After a bit of working out I realised that the following works O.K

    TO_DATE(TO_CHAR(OP_DATE, 'DD-MON-YYYY') || ' ' || INTO_RECOVERY, 'DD-MON-YYYY HH24:MI')AS INTO_RECOVERY

    Thanks for your help

Posting Permissions

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