-
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|