DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: date add

  1. #1
    Join Date
    Jul 2001
    Posts
    7
    Hi,

    I am having a column in table which is storing date in the form of seconds since 01/01/1970.

    I just want to write a query to check time of records if they fall between 8:00AM and 11:00AM

    Can anybody pls. help me write a SQL(ORACLE) query for this.

    really appreciate any help

    thanks
    Ajay

  2. #2
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588

    Thumbs up

    Hi,

    You can use following query...


    SELECT TO_DATE('01.01.1970','dd.mm.yyyy') + COL_NAME/(24*60*60)
    FROM YOUR_TAB
    WHERE TO_CHAR(TO_DATE('01.01.1970','dd.mm.yyyy') + COL_NAME/(24*60*60), 'HH24:MI:SS') BETWEEN '8:00:00'
    AND '11:00:00';


    Hope this helps...

    Sameer


Posting Permissions

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


Click Here to Expand Forum to Full Width