1
I am doing a test with some tables, and I decided to do a test with the following command :
select 1 from dual
where sysdate between trunc(:dt-inicio,'dd') and trunc(:dt-fim,'dd');
select 1 from dual
where sysdate between trunc(:dt_inicial, 'dd') and trunc(:dt_final, 'dd') + 86399 / 86400
This code is returning me the error below:
ORA-00932: tipos de dados inconsistentes: esperava DATE obteve NUMBER
00932. 00000 - "inconsistent datatypes: expected %s got %s"
*Cause:
*Action:
I’ve done other tests with other types of data and it worked.
Thank you for the reply.
– WC Data
Thanks for the answer. I had already used it this way. The error is giving when I put the operation " + 86399 / 86400" with the date. It is necessary to have this operation to take an average of a given time and the period I put. Ex : "01/03/2020 and 04/03/2020 ->Time the customer was served at the reception and the time he received the product"
– WC Data
In this type of calculation I convert all seconds , I make the calculation , average etc , and I reconvert for days, hours etc an example https://forum.imasters.com.br/topic/587158-diff%C3%A7a-between-dates-with-day-hour-and-minutes/? tab=comments#comment-2289792
– Motta