Sum an amount between a certain date range

Hello,
I am working out a home budget and want to know how to calculate what is due this month.
I have two columns - "Amount" and "Due Date". Some content for an example is:
Amount,Due Date
20,15/05/2009
300,16/05/2009
40,1/06/2009
What I want is a formula which will sum the total amount of items due within this months' date range. If the date range could be as automatic as "This Month" that would be great otherwise I would say IF "Due Date" between 1/05/2009 and 31/5/2009.
Is this possible?

In column D, the formula is:
=YEAR(C)*100+MONTH(C)
In B8 and in B9 the formula is:
=SUMIF(D,YEAR(A)*100+MONTH(A),B)
Yvan KOENIG (from FRANCE jeudi 14 mai 2009 15:30:56)

Similar Messages

  • How to change bucket capacity for a certain date range (duration)?

    Hi,
    I need to update the bucket capacities of Resource at Vendor location in APO live cache for a particular period using BAPI_RSSRVAPS_CHANGEMULTI.
    Here I am executing BAPI by passing -
    Import Parameters:
    LOGICAL_SYSTEM
    COMMIT_CONTROL
    PLANNING_VERSION
    Tables:
    RESOURCE_HEAD
    (RESOURCE = Resource  " Test123
    LOCATION = Vendor Number/Loctaion
    CAPACITY_A = 5000.000
    NUM_OF_PERIODS = 001
    PERIOD = 02    " Day Wise
    UTIL_BUCKET = 100.000 )
    RESOURCE_HEAD_X
    (All corresponding fields X)
    RESOURCE_QUANMODEL
    (RESOURCE = Resource  " Test123
    VERSION = 01
    ENDDA = 02/25/2011
    BEGDA = 02/21/2011
    QUANMODEL = 8000 )
    RESOURCE_QUANMODEL_X
    (All corresponding fields X)
    [ I have a capacity variance:
    Resource = Test123; Capacity Varient = 01; Valid From = 02/21/2011
    Valid To = 02/25/2011; Bucket Util Rate = 100.000; Qty/Rate definition = 8000 ]
    Now, while I execute /SAPAPO/RES01 to display Capacity for that resource-Location-PlanningVersion, Its showing that 'Bucket Capacity' and 'SNP Bucket Capacity' get changed into 5000. But this change happend for all the days and not only for the duration I passed into Bapi (From BEGDA to ENDDA).
    How to change bucket capacity for a certain date range (duration)? Any help please.
    Thanks
    Roy

    I did it myself. Hence closing the thread.
    Solution:
    1. Get RESUID from /SAPAPO/RESKEY table by passing Resource as NAME.
    2. Call Function Module /SAPAPO/CRES_QUANPROF_UPDATE
    3. Call Function Module /SAPAPO/CRES_SAVE_FROM_BT
    For further help, change manually a single record in the 'capacity profile' in TXN /SAPAPO/RES01 and debug both the FM mentioned above.
    BR
    Roy

  • Max date data between the input date range.

    Hi
    I need to get the maximum date data's with in the date range.
    Ex: this is sample date but , total records in DB around 2000.
    NAME DATE Product1 Product2
    aaaa 01/05/2011 5 5
    aaaa 03/05/2011 3 3
    bbbb 04/05/2011 6 6
    bbbb 07/05/2011 2 2
    aaaa 06/05/2011 1 1
    case :1) If the user input date is 01/05/2011 to 05/05/2011
    then the result should be
    aaaa 3 3
    bbbb 6 6
    case :2) If the user input date is 01/05/2011 to 10/05/2011
    then the result should be
    aaaa 1 1
    bbbb 2 2
    so my result is purely based on max date between the input date range.
    how to achieve the result

    Dhiva wrote:
    Hi
    I need to get the maximum date data's with in the date range.
    Ex: this is sample date but , total records in DB around 2000.
    NAME DATE Product1 Product2
    aaaa 01/05/2011 5 5
    aaaa 03/05/2011 3 3
    bbbb 04/05/2011 6 6
    bbbb 07/05/2011 2 2
    aaaa 06/05/2011 1 1
    case :1) If the user input date is 01/05/2011 to 05/05/2011Jan 05 to May 05
    or
    May 01 to May 05
    what date is 07/08/09?

  • Working hours of an employee between a given date range

    Hi Everyone,
    how to calculate working hours of an employee between a given date range
    Please anyone qive me some idea..
    Thanks in advance

    Hi Lathessh,
    Thanks for the reply here is the sample data. Actually we have two datetime field and i want to calculate the Ageing of an employee , by excluding of sunday and holiday between startdate and endDate.
    Ageing should be in hours.   Thanks
    StartDateTime
    EndDateTime
    HolidayList
    2/24/2014 11:55
    3/1/2014 16:45
    1/1/13 0:00
    2/24/2014 12:08
    2/28/2014 12:55
    1/14/13 0:00
    2/24/2014 16:16
    2/28/2014 15:20
    1/25/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    3/27/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    3/29/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    4/24/13 0:00
    2/14/2014 12:56
    3/4/2014 16:20
    5/1/13 0:00
    2/26/2014 13:53
    3/4/2014 16:20
    8/9/13 0:00
    2/27/2014 12:13
    3/5/2014 13:05
    8/15/13 0:00
    3/3/2014 14:42
    3/5/2014 17:05
    8/20/13 0:00
    3/3/2014 14:42
    3/5/2014 17:05
    8/28/13 0:00
    3/3/2014 14:42
    3/5/2014 17:05
    9/18/13 0:00
    3/6/2014 12:28
    3/6/2014 17:55
    10/2/13 0:00
    3/6/2014 12:59
    3/7/2014 13:55
    10/16/13 0:00
    3/6/2014 14:37
    3/7/2014 11:15
    11/5/13 0:00
    3/6/2014 14:57
    3/7/2014 12:10
    11/15/13 0:00
    3/4/2014 17:21
    3/10/2014 15:55
    12/4/13 0:00
    3/4/2014 17:21
    3/10/2014 15:55
    12/25/13 0:00
    3/6/2014 12:08
    3/10/2014 14:10
    12/31/13 0:00
    3/6/2014 13:31
    3/10/2014 13:05
    1/1/14 0:00
    3/6/2014 13:14
    3/11/2014 13:20
    1/14/14 0:00
    3/6/2014 13:14
    3/11/2014 13:20
    3/17/14 0:00
    3/11/2014 14:29
    3/13/2014 11:20
    4/8/14 0:00
    3/11/2014 14:29
    3/13/2014 11:20
    4/14/14 0:00
    3/12/2014 12:56
    3/13/2014 11:45
    4/18/14 0:00
    3/12/2014 12:56
    3/13/2014 11:45
    5/1/14 0:00
    3/12/2014 14:02
    3/12/2014 18:10
    7/29/14 0:00
    3/12/2014 14:22
    3/12/2014 18:05
    8/15/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    8/18/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    8/29/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    10/2/14 0:00
    2/24/2014 16:49
    3/14/2014 12:10
    10/3/14 0:00
    3/12/2014 11:31
    3/14/2014 15:55
    10/6/14 0:00
    3/12/2014 13:31
    3/15/2014 12:20
    10/23/14 0:00
    3/12/2014 15:31
    3/15/2014 11:10
    10/24/14 0:00
    3/12/2014 15:49
    3/14/2014 13:55
    12/25/14 0:00
    3/12/2014 16:19
    3/14/2014 15:05
    12/31/14 0:00

  • Formula to return text answer from a date cell that falls within a certain date range

    I have a cell, lets say B2 which has a date eg/ 21JUN14. I want to return which season this falls into eg "low", "shoulder", "peak" etc from 5 specified date ranges. thanks.

    HI KJ,
    Here's the syntax for VLOOKUP, taken from the Numbers Help files:
    VLOOKUP(search-for,search-range,return-column,close-match)
    Your assumption regarding the 2 is correct.
    The other key value is Wayne's omission of the fourth argument, "close-match". When omitted, VLOOKUP will look for an exact match, but will accept a close match, defined as 'the largest value less than (or equal to) search-value.
    close-match is the reason the table needs to include only the first date of each season, sometimes referred to as the 'threshold value'. Any date 'larger' than that, but less than the next season's starting date will be accepted as being in that particular season.
    Note that the searched for dates include the year. The Seasons table will need to be updated regulrly. If you know the starting dates for more than one year, all can be entered as soon as they are known. The table will handle as many dates as are currently known (within a limit that's in the tens of thousands).
    Regards,
    Barry

  • How to determine if first date in multi record dataset is between certain date range.

    Post Author: wal
    CA Forum: Formula
    I am trying to determine how many patients enrolled in our database from 1/1/2000 to 12/31/2003. The "ltvisit" table has a field called "visit_date" which is the field I am working with to determine. How do I code in crystal reports to find out if the FIRST visit_date record (FIRST VISIT) was between 1/1/2000 and 12/31/2003. Thanks.

    Post Author: yangster
    CA Forum: Formula
    are you creating this in a command or you just bringing in the information from a single table or whatwhat you need to do is do a simple queary to pull in the first record from the patientonce you have that date then you then can do a simple in statement between your 2 dates

  • Getting last-day-of-week dates within certain date range

    Hi all,
    I have the following Challenge:
    I want to know the dates of the last day of all the weeks within a certain range of dates.
    For instance if my range would be 01-jun-2002 - 31-jun-2002
    then the returned days should be (lastday of the week is sunday):
    . 02-jun-2002
    . 09-jun-2002
    . 16-jun-2002
    . 23-jun-2002
    . 30-jun-2002
    I want to accomplish this by only using sql (no pl/sql) in a ora 8.0.x rdbms
    How would I do this? (if it's possible)
    Tia,
    Martin

    Christian's solution returns
    01-JUN-02
    08-JUN-02
    15-JUN-02
    22-JUN-02
    on my system. The first day of the week is dependent on NLS settings.
    SELECT MAX(realdate)
    FROM (
    SELECT TO_CHAR(TO_DATE('31-may-2002','dd-mon-yyyy') + ROWNUM,'IW') weekno,
           TO_DATE('31-may-2002','dd-mon-yyyy') + ROWNUM realdate
    FROM all_objects
    WHERE rownum <= TO_DATE('30-Jun-2002','dd-mon-yyyy') - TO_DATE('01-Jun-2002','dd-mon-yyyy')
    GROUP BY weeknoThe IW format model give ISO standard week numbers and a week always starts on Monday.

  • Using field highlighter to highlight records with a certain date range

    I've been asked to highlight a field based on the fact that the "Submit" date is greater than a certain value. The problem is that there's no way to pre-determine what that value is. It changes.
    The user wants to be prompted for the value when he runs the report. That value would then be stored as a variable which would be used in the script to determine if the field should be highlighted.
    Does anyone know if there a way to do this?

    Thanks for your quick reply Raghavendra.
    How does that prompt the submitter for the Date value he wants to use and the date to compare the submit date against?
    Here's the scenario.
    A user wants to highlight all "new" tickets submitted since last time he ran the report. It's not like he runs the report every friday which would make it easy because then you'd compare the submit date to "today-7" so-to-speak. He runs the report randomly. He wants to be prompted for a date before the report runs to replace "today-7".
    Could you help explain how to prompt the use for that date.

  • Why is this date not between these 2 date range

    hi ,
    when i execute the following
    select case when to_date('11/27/2006 11:58:35 PM' , 'mm-dd-yyyy hh:mi:ss am') not between
      to_date('11/26/2006 9:04:33 AM', 'mm-dd-yyyy hh:mi:ss am') and to_date('11/27/2006 12:02:00 PM', 'mm-dd-yyyy hh:mi:ss am') then 1 ELSE 2
      END from dual;it returns 1
    why is that so ?
    how can i really get the 2 ?
    pls advise
    tks & rdgs

    r u saying that 11/27/2006 12:02:00 PM is actually the noon's 12 pm and not
    the nite's 12 pm ?Yes. 12.02 AM = two minutes past midnight,12.02 PM = two minutes past midday (noon). Find out more.
    So you probably want a range boundary of 11/28/2006 12:02:00 AM.
    Cheers, APC

  • Sum a by previous month's date range

    Hello,
    i am having trouble creating a formula for the following.
    sum(,,) in minimum(Lastfullmonth)-1 and in maximum(Lastfullmonth)-1
    can anyone help me out with this formula?
    thanks
    david
    Edited by: davitali on Nov 22, 2011 2:54 AM

    Hi David,
    If you're using CR 2008, you can make use of the advanced cross-tab features available.
    Follow the steps below to create a calculated member (a.k.a row or column):
    1) In the Preview mode, right-click the column header that shows the last month. Considering September as the last month, Right-click the column header > Calculated Member > Insert Column
    2) A column with a blank header and zero values comes up after September
    3) Right-click the blank column header and select Calculated Member > Edit Header Formula. Type this in the editor:
    "Difference"
    4) Now, the blank column header displays the text 'Difference'
    5) Next, right-click one of the zero values in this column and select Calculated Member > Edit Calculation Formula. Type this formula:
    Gridvalueat(currentrowindex,currentcolumnindex-1,currentsummaryindex) - Gridvalueat(currentrowindex,currentcolumnindex-2,currentsummaryindex)
    The Crosstab would now display the difference between the two months.
    To change the font color of the value try this:
    1) Right-click one of the values from the column and select Format Field > Font tab > click the formula button beside Color and use this formula:
    if CurrentColumnIndex = 1 then
        if currentfieldvalue < Gridvalueat(currentrowindex,currentcolumnindex-1,currentsummaryindex)
        then crRed else crGreen
    else
    crNoColor
    If you have not suppressed the Row Totals or if the Row Totals is the 1st Column, then the formula might color the column beside Total (October) instead of the last (September). Just change the value of CurrentColumnIndex in the above formula to 2.
    Let me know how this goes!
    -Abhilash

  • Sql query : sum of feild between two conditional date

    hi
    I have a table whit 3 field like below. I want to Find the
    total number of hours in mode "run" after the latest mode "decoke".
    field time is for every day and its unique.
    id -- time  --  mode -- hour
    1  --1/1/1 -- run  --  24
    2  -- 1/1/2  -- off  -- 24
    3  -- 1/1/3  decoke  -- 24
    4  -- 1/1/4  -- run  -- 24
    5  -- 1/1/5  -- run -- 24
     this query should add row 4 and 5 , the latest "run" after "decoke"

    Create table #temp
    [id] int identity(1,1)
    , [time] date
    , [mode] varchar(50)
    , [hour] int
    Insert into #temp
    Select '1/1/1' , 'run' ,24
    Union
    Select '1/1/2' , 'off' ,24
    Union
    Select '1/1/3' , 'decoke' ,24
    Union
    Select '1/1/4' , 'run' ,24
    Union
    Select '1/1/5' , 'run' ,24
    -----Here is the Query-------
    ;With Cte_TotalTime
    As
    Select Max(time)[Time] from #temp Where mode = 'decoke'
    Select SUM(a.hour) TotalRunHours from #temp a
    Inner join Cte_TotalTime b on a.[time] > b.[Time]
    And mode = 'run'
    Drop table #temp
    Please mark as answer if it is helpful to you.
    Thanks

  • Powershell to Remove Emails for a certain date range

    We are about to move our Email Archive System and are not going to be using stubs anymore.  Our current Email Archive System doesn't provide a solution to remove all the stubs we currently have in Exchange 2010 for all users.  So i need a Powershell
    command or script to do this and wonder if anyone hand one handy.  It needs to remove all emails/stubs over 6 months old from all folders on all users mailboxes.  It might be safer to move them to another mailbox if i can so any that aren't stubs
    can be moved back.  
    Also it would be really helpful if the command first off did this on just one user so i can test it before using it on all users, or can it be ran against a single database - as i can guess this command is going to take some time as we have stubs going back
    to 2006 on 200 mailboxes.
    Thanks

    Just found this 
    http://blogs.technet.com/b/exchange/archive/2010/10/27/removing-specific-messages-from-your-exchange-server.aspx
    Which fills all my requirements however can't get it to work because Export-Mailbox cmdlet doesn't seem to exist in SP1.  I have followed this guide:
    http://blogs.technet.com/b/exchange/archive/2010/03/26/3409621.aspx
    But that doesn't seem to enable it.  Anyone know how i can do this?

  • Sum amount within a date range

    I have 2 tables where I Need to sum up sales amount within a booking date range.
    Below an example to help illustrate this task.
    Table1:
    CustomerID BookingDate (YYYY-MM-DD)
    1 2014-04-29
    1 2014-07-30
    2 2014-03-31
    2 2014-06-30
    Table2:
    CustomerID SalesDate (YYYY-MM-DD) Amount
    1 2014-01-30 20
    1 2014-02-25 30
    1 2014-05-20 100
    1 2014-07-30 200
    1 2014-09-30 80
    2 2014-03-20 50
    Result:
    CustomerID BookingDate (YYYY-MM-DD) Sum(Amount From Table2)
    1 2014-04-29 50 -- SalesDate between 2014-01-01 and 2014-04-29
    1 2014-07-30 300 -- SalesDate between 2014-04-30 and 2014-07-30
    2 2014-03-31 50 -- SalesDate between 2014-01-01 and 2014-03-31
    2 2014-06-30 0 -- SalesDate between 2014-04-01 and 2014-06-30

    Please try this code:
    declare @Table1 table
    (CustomerID int,BookingDate date );
    insert @Table1
    values
    ( 1, '2014-04-29' ),
    (1, '2014-07-30' ),
    (2, '2014-03-31' ),
    (2, '2014-06-30') ;
    declare @Table2 table
    (CustomerID int, SalesDate date, Amount int);
    insert @Table2
    values
    (1,'2014-01-30',20) ,
    (1,'2014-02-25',30) ,
    (1,'2014-05-20',100) ,
    (1,'2014-07-30',200) ,
    (1,'2014-09-30',80) ,
    (2,'2014-03-20',50) ;
    with cte as
    select
    CustomerID,
    BookingDate ,
    row_number() over (partition by CustomerID order by BookingDate ) as rn
    from @Table1 )
    , cte2 as
    select
    T2.CustomerID ,
    isnull(T1.BookingDate, '2014-01-01') as FromDate,
    T2.BookingDate as ToDate
    from cte as T1
    right join cte as T2
    on T1.rn = T2.rn - 1
    and T1.CustomerID = T2.CustomerID
    select
    b.CustomerID ,
    b.ToDate as BookingDate,
    isnull(sum(a.Amount), 0) as [Sum(Amount From Table2)]
    from @Table2 as a
    right join cte2 as b
    on a.CustomerID = b.CustomerID
    and a.SalesDate > b.FromDate
    and a.SalesDate <= b.ToDate
    group by
    b.CustomerID ,
    b.ToDate;
    T-SQL Articles
    T-SQL e-book by TechNet Wiki Community
    T-SQL blog

  • Oracle 8i - select between to date ranges, but exculde time ranges

    Hi, I'm using Oracle 8i
    I'm trying to select a set of records that are between a certain date time (say between October 15 at 6pm and October 17 at 6am) and then want to include only those records that fall between 6am and 6pm within the range.
    I've tried extract and trunc function and can't seem to get it to work.
    If I do a trunc to try to pull out only hour, it returns all of the date information as well:
    SQL> select trunc(to_date('14-10-2007 02:43:46','DD-MM-YYYY HH24:MI:SS'),'HH24') from dual;
    TRUNC(TO_DATE('14-10
    14-OCT-2007 02:00:00
    SQL>Any Ideas? Here is some sample data:
    select * from
            select to_date('14-10-2007 02:43:46','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 03:02:50','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:13:16','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:16:04','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:18:26','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:20:25','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:22:35','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:23:59','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:26:30','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:33:30','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:54:36','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 15:56:11','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('14-10-2007 18:56:52','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('15-10-2007 09:12:38','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('15-10-2007 10:23:42','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('15-10-2007 11:17:32','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('15-10-2007 11:46:12','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('15-10-2007 12:36:22','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('15-10-2007 23:23:17','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('16-10-2007 14:43:06','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('16-10-2007 14:44:37','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('16-10-2007 14:48:17','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('16-10-2007 14:49:36','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('16-10-2007 15:07:05','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('16-10-2007 15:08:24','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 08:55:33','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 09:58:19','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 15:07:16','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 15:19:35','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 15:58:32','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 19:56:51','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 21:22:49','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 22:16:52','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('17-10-2007 22:45:51','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 07:52:10','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 07:54:15','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 08:03:57','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 08:31:27','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 09:16:14','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 11:10:55','DD-MM-YYYY HH24:MI:SS') from dual union all
            select to_date('18-10-2007 11:21:57','DD-MM-YYYY HH24:MI:SS') from dual
    ) DataSet

    If you can subtract date types from each other in 8i (I think you can but don't know for sure) you can use this:select dte, (dte-trunc(dte))*24 hours
    from (SELECT TO_DATE('15-10-2007 05:59:59',    'DD-MM-YYYY HH24:MI:SS') DTE FROM DUAL UNION ALL
       SELECT TO_DATE('15-10-2007 06:00:00',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('15-10-2007 06:00:01',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('15-10-2007 17:59:59',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('15-10-2007 18:00:00',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('15-10-2007 18:00:01',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('16-10-2007 05:59:59',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('16-10-2007 06:00:00',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('16-10-2007 06:00:01',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('16-10-2007 17:59:59',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('16-10-2007 18:00:00',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('16-10-2007 18:00:01',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('17-10-2007 05:59:59',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('17-10-2007 06:00:00',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('17-10-2007 06:00:01',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('17-10-2007 17:59:59',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('17-10-2007 18:00:00',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL UNION ALL
       SELECT TO_DATE('17-10-2007 18:00:01',    'DD-MM-YYYY HH24:MI:SS') FROM DUAL
       ) t
    where dte between TO_DATE('15-10-2007 18:00:00',    'DD-MM-YYYY HH24:MI:SS')
                  and TO_DATE('17-10-2007 06:00:00',    'DD-MM-YYYY HH24:MI:SS')
          and (dte-trunc(dte))*24 between 6 and 18
    DTE                       HOURS                 
    15-OCT-2007 18.00.00      18                    
    16-OCT-2007 06.00.00      6                     
    16-OCT-2007 06.00.01      6.00027777777777777777777777777777777778
    16-OCT-2007 17.59.59      17.99972222222222222222222222222222222222
    16-OCT-2007 18.00.00      18                    
    17-OCT-2007 06.00.00      6                     
    6 rows selected

  • List Months between a date range

    Hi, I'm trying to list the months between a given date range in an ABAP report to generate a MIS report(ALV).. Say I have 2 date ranges, 01.01.2006 to 01.04.2006.. I want to list
    Jan 2006
    Feb 2006
    Mar 2006
    Apr 2006.. Any FM in SAP to get this OP..

    hi vivek,
    use this function module to get months beween two dates
    1. MONTHS_BETWEEN_TWO_DATES   or
    2. MONTHS_BETWEEN_TWO_DATES_NEW
    please reward the point if you are satisfied with answer
    thanks,
    john.

Maybe you are looking for

  • [SOLVED] GNOME 3.8 Classic mode - can't edit panels

    Hi! I've just switched from MATE to GNOME (3.8.4). I use gnome-classic ("gnome-session --session gnome-classic" opened from whether gdm or slim/xinitrc). How do I edit panels and applets on them? I know that Alt+Right click on the panel doesn't alway

  • PDF as multiple text boxes

    When I open up a pdf that was written in hebrew to edit it. It shows up as a whole bunch of little text boxes instead of one big paragraph has anyone ever encountered such a problem?

  • How to use bind variables in this procedure

    Hi Experts, How to use bind variables in this procedure for static queries. PROCEDURE DELETE_MER_PROC (M_id IN NUMBER) IS BEGIN V_date DATE; SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;     DELETE FROM MER_CLEAR     WHERE MER_DT < v_date     AND ID =

  • Problem when installing eclipse,plz help me...

    my java version is 1.4.0_01, but when i tried to install MyEclipse Enterprise Workbench 5.1.0 GA it's giving you need jvm1.4.1 are above.. Message was edited by: satyab

  • Show On A Custom Component

    I have a custom component based uon a VBox I am using the following show="myFunction()" private function myFunction():void{ trace("In the function); But the trace never shows? The show is never hit. If I change the name of the function, I get the cal