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
You can use following query...
SELECT TO_DATE('01.01.1970','dd.mm.yyyy') + COL_NAME/(24*60*60)
WHERE TO_CHAR(TO_DATE('01.01.1970','dd.mm.yyyy') + COL_NAME/(24*60*60), 'HH24:MI:SS') BETWEEN '8:00:00'
Hope this helps...
Click Here to Expand Forum to Full Width