1

Topic: Data from a temporal interval.

All greetings. The help is urgently necessary. I need to return statistics for the last 7 days and that records created would be returned from 8:00 till. CREATED is a date creations, such type of 10/26/2017 of 7:53:17 PM. The conditions resulted more low yield empty result. Prompt please, in what an error or other variants.
In advance thanks.
AND created> sysdate - 7
AND created BETWEEN to_date (' 8:00:00 AM ', ' HH24:MI:SS') AND to_date (' 6:00:00 PM ', ' HH24:MI:SS')

2

Re: Data from a temporal interval.

select to_date (' 8:00:00 AM ', ' HH24:MI:SS')

Also there comes an enlightenment.

3

Re: Data from a temporal interval.

aleks222;
Thanks, all it are healthy. An error found. But it did not solve a problem.

4

Re: Data from a temporal interval.

chuwees;
Well so show - how corrected.... And that after the first post - faiths to you are not present....

5

Re: Data from a temporal interval.

chuwees wrote:

aleks222;
Thanks, all it are healthy. An error found. But it did not solve a problem.

Yes, the enlightenment did not come.
Attempt No2
1. We make comments on filters in where...  records do not appear.
2. We scratch turnip: "that not so in these filters?"

6

Re: Data from a temporal interval.

where created BETWEEN to_date (' 8:00:00 AM ', ' HH24:MI:SS') AND to_date (' 6:00:00 PM ', ' HH24:MI:SS')
The condition returns only those records which are created 1/1/2018 from 8:00 till

7

Re: Data from a temporal interval.

chuwees wrote:

where created BETWEEN to_date (' 8:00:00 AM ', ' HH24:MI:SS') AND to_date (' 6:00:00 PM ', ' HH24:MI:SS')
The condition returns only those records which are created 1/1/2018 from 8:00 till

More persistently we scratch turnip...

8

Re: Data from a temporal interval.

aleks222 wrote:

we scratch turnip More persistently...

I any more fight the first hour with it. I have not enough experience in creation of requests. Therefore also wrote here.
At me only one variant - to substitute specific dates before time in request
(' 1/17/2018 of 8:00:00 AM ', ' DD.MM.YYYY HH24:MI:SS '). But it does not approach. The general-purpose script is necessary.

9

Re: Data from a temporal interval.

chuwees wrote:

where created BETWEEN to_date (' 8:00:00 AM ', ' HH24:MI:SS') AND to_date (' 6:00:00 PM ', ' HH24:MI:SS')
The condition returns only those records which are created 1/1/2018 from 8:00 till

And what such to_date?

10

Re: Data from a temporal interval.

chuwees wrote:

where created BETWEEN to_date (' 8:00:00 AM ', ' HH24:MI:SS') AND to_date (' 6:00:00 PM ', ' HH24:MI:SS')
The condition returns only those records which are created 1/1/2018 from 8:00 till

And you persistent! Try still. On the one hundred-tyshch-pjatsot-first time the server surrenders....

11

Re: Data from a temporal interval.

Tactical Nuclear Penguin;
Conversion of the text to date

12

Re: Data from a temporal interval.

chuwees wrote:

it is passed...
I any more fight the first hour with it. I have not enough experience in creation of requests. Therefore also wrote here.
At me only one variant - to substitute specific dates before time in request
(' 1/17/2018 of 8:00:00 AM ', ' DD.MM.YYYY HH24:MI:SS '). But it does not approach. The general-purpose script is necessary.

between compares dates
Time is necessary to you

to_time (created) BETWEEN to_time (' 8:00:00 AM ', ' HH24:MI:SS') AND to_time (' 6:00:00 PM ', ' HH24:MI:SS')

13

Re: Data from a temporal interval.

chuwees wrote:

Tactical Nuclear Penguin;
Conversion of the text to date

You with  not ?
And generally esteem about DATEPART

14

Re: Data from a temporal interval.

Tactical Nuclear Penguin;
Yes what difference that there at it as a DBMS if in a head porridge also is not present understanding that "date and time" in one bottle is at all too most that "time" is simple

15

Re: Data from a temporal interval.

[quote=Tactical you with  not ?
And generally esteem about DATEPART

To campaign  sad it is necessary to allocate a subject in other place? ((