1

Topic: Operation with dates

Month and year is known. For example September 2016
Dates started are stored in the table and the terminations of sales and the total.
1) 2/1/2015 - 4/10/2015 200
2) 4/11/2015 - 9/12/2016 400
3) 9/13/2016 - 11/5/2017 700
How to define that 9th month 2016 known to us gets to two periods, that is there should be totals from 2 and 3 lines

2

Re: Operation with dates

Galina Sh;
?

.. where to_date (' 09.2016 ', ' MM.YYYY ') between trunc (date1, ' MM ') and last_day (date2)

To "forms" what relation has?
-  were mistaken a little => forum/oracle

3

Re: Operation with dates

Galina Sh wrote:

month and year Is known. For example September 2016
Dates started are stored in the table and the terminations of sales and the total.
1) 2/1/2015 - 4/10/2015 200
2) 4/11/2015 - 9/12/2016 400
3) 9/13/2016 - 11/5/2017 700
How to define that 9th month 2016 known to us gets to two periods, that is there should be totals from 2 and 3 lines

The index after dates is?
ps
1) if is
Intersection of intervals
The beginnings/terminations and 01.09.2016-30.09.2016
2) if is not present
' 201609 ' between to_char (z, ' yyyymm ') and to_char (po, ' yyyymm ')
....
stax
The moderator: the Subject is transferred from a forum "Oracle Forms".