0
I have a column where I enter a date when the event happens (local storage), and the date when the event is sent to my system.
The difference between the date of the event and the date of dispatch must not exceed 168 hours (7 days).
I would like to select all the data that event data + 168h is less than the shipping data.
SELECT * FROM VENDA
WHERE (DATA_VENDA+ 168HOURAS) < DATA_ENVIO_VENDA;
I’m using Oracle database.
Will this take into account the time as well or just the date? example: sale day 01/xx/xxxx at 12:00:00 and shipping day 08/xx/xxxx at 11:59:00, this will give me a false positive? Anyway I will test.
– Gabriel Lemos
Will take into account the time yes, in the example you gave the condition of the
where
will not be satisfied and therefore will not return this line. I updated the example that is on the answer link to simulate your question.– Caique Romero