SELECT WITH TIMESTAMP AND SYSDATE [message #669792] |
Sun, 13 May 2018 12:19 |
|
cruizji
Messages: 1 Registered: May 2018
|
Junior Member |
|
|
Hello, I am Junior in Oracle and I have a big problem. I need to write a Query to get information with sysdate but my date is in format timestamp(1510614000) but the date_type is number so I don't know how to write it.
I have an example:
COLUMN_NAME DATA_TYPE
----------- -----------
ID_CLIENT NUMBER
NAME VARCHAR
DATE NUMBER
1510614000=14/11/2017 0:00:00
I woulk like to write something like that:
SELECT * FROM x.table WHERE DATE > sysdate - 7 days
Could you help me, please?
Thank you.
Regards
|
|
|
|
|
Re: SELECT WITH TIMESTAMP AND SYSDATE [message #669800 is a reply to message #669799] |
Mon, 14 May 2018 08:10 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
To expand on what Ed said, storing the unix timestamp in your date column is not a great idea since you can easily convert it into an oracle timestamp when you insert into the database. Having it as an oracle date will allow much better searching and date manipulation.
|
|
|