Common way to compare timestamp in oracle, postgres and mssql
Posted
by Pratik
on Stack Overflow
See other posts from Stack Overflow
or by Pratik
Published on 2010-03-24T04:43:14Z
Indexed on
2010/03/24
4:53 UTC
Read the original article
Hit count: 563
Hi There!
I am writing a sql query which involves finding if timestamp falls in particular range of days . I have written that in the postgres but it doesn't works in oracle and msssql. Is there are common way to compare the timestamp across different database. My postgres sql looks something like this
...
AND creation_date < (CURRENT_TIMESTAMP - interval '5 days')
AND creation_date >= (CURRENT_TIMESTAMP - interval '15 days')
...
Thanks!
Pratik
© Stack Overflow or respective owner