Saturday's between date range

Hi All,
            I need to findout the number of satuday's between the given date range.
Please tell me if there are any function modules or methods to calculate this.
Regards
Suprith

Hi Suprith,
Please refer the below Code.
CALL FUNCTION 'DAY_ATTRIBUTES_GET'
EXPORTING
*   FACTORY_CALENDAR                 = ' '
*   HOLIDAY_CALENDAR                 = ' '
   DATE_FROM                        = From_Date
   DATE_TO                          = To_Date
   LANGUAGE                         = SY-LANGU
*   NON_ISO                          = ' '
* IMPORTING
*   YEAR_OF_VALID_FROM               =
*   YEAR_OF_VALID_TO                 =
*   RETURNCODE                       =
  TABLES
    day_attributes                   = it_day_attri
* EXCEPTIONS
*   FACTORY_CALENDAR_NOT_FOUND       = 1
*   HOLIDAY_CALENDAR_NOT_FOUND       = 2
*   DATE_HAS_INVALID_FORMAT          = 3
*   DATE_INCONSISTENCY               = 4
*   OTHERS                           = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
in the Export internal table it_day_attri  you will get all the dates and its respective days. if you delete the records other than Saturday , the number of entries will be needed count of saturday.
delete it_day_attri where WEEKDAY  <> '6'.
DESCRIBE TABLE it_day_attri LINES Count.
note  :  weekday day number ( Saturday = 6 may vary based on factory calendar )
Edited by: Prasath Arivazhagan on Apr 8, 2010 1:07 PM

Similar Messages

  • Need help to join two tables using three joins, one of which is a (between) date range.

    I am trying to develop a query in MS Access 2010 to join two tables using three joins, one of which is a (between) date range. The tables are contained in Access. The reason
    the tables are contained in access because they are imported from different ODBC warehouses and the data is formatted for uniformity. I believe this cannot be developed using MS Visual Query Designer. I think writing a query in SQL would be suiting this project.
    ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2.
    [ABCTABLE]
    ABCORDER
    ABCPART
    ABCSERIAL
    ABCDATE
    [ZYXTABLE]
    XYZORDER
    XYZPART
    XYZSERIAL
    XYZDATE1
    XYZDATE2

    Thank you for the looking at the post. The actual table names are rather ambiguous. I renamed them so it would make more sense. I will explain more and give the actual names. What I do not have is the actual data in the table. That is something I don't have
    on this computer. There are no "Null" fields in either of the tables. 
    This table has many orders (MSORDER) that need to match one order (GLORDER) in GLORDR. This is based on MSPART joined to GLPART, MSSERIAL joined to GLSERIAL, and MSOPNDATE joined if it falls between GLSTARTDATE and GLENDDATE.
    [MSORDR]
    MSORDER
    MSPART
    MSSERIAL
    MSOPNDATE
    11111111
    4444444
    55555
    2/4/2015
    22222222
    6666666
    11111
    1/6/2015
    33333333
    6666666
    11111
    3/5/2015
    This table has one order for every part number and every serial number.
    [GLORDR]
    GLORDER
    GLPART
    GLSERIAL
    GLSTARTDATE
    GLENDDATE
    ABC11111
    444444
    55555
    1/2/2015
    4/4/2015
    ABC22222
    666666
    11111
    1/5/2015
    4/10/2015
    AAA11111
    555555
    22222
    3/2/2015
    4/10/2015
    Post Query table
    GLORDER
    MSORDER
    GLSTARTDATE
    GLENDDATE
    MSOPNDATE
    ABC11111
    11111111
    1/2/2015
    4/4/2015
    2/4/2015
    ABC22222
    22222222
    1/5/2015
    4/10/2015
    1/6/2015
    ABC22222
    33333333
    1/5/2015
    4/10/2015
    3/5/2015
    This is the SQL minus the between date join.
    SELECT GLORDR.GLORDER, MSORDR.MSORDER, GLORDR.GLSTARTDATE, GLORDR.GLENDDATE, MSORDR.MSOPNDATE
    FROM GLORDR INNER JOIN MSORDR ON (GLORDR.GLSERIAL = MSORDR.MSSERIAL) AND (GLORDR.GLPART = MSORDR.MSPART);

  • How to count the days between Date Range using OO ABAP?

    hi experts,
            i want to count the days between Date Range using OO ABAP for that  which class and method  can i use?.
    Thanks,
    Mahesh.

    Not sure I understand the requirement for it to be OO, but you could always write your own (i.e. use this):
    REPORT zz_date_diff.
    CLASS date_diff DEFINITION.
      PUBLIC SECTION.
        METHODS diff IMPORTING     i_date_fm TYPE d
                                   i_date_to TYPE d
                     EXPORTING     e_days    TYPE i.
    ENDCLASS."
    CLASS date_diff IMPLEMENTATION.
      METHOD diff.
        e_days = i_date_to - i_date_fm.
      ENDMETHOD."
    ENDCLASS."
    DATA: g_ref TYPE REF TO date_diff,
          g_days  TYPE i,
          g_date_fm  TYPE d VALUE '20080101',
          g_date_to  TYPE d VALUE '20090101'.
    START-OF-SELECTION.
      CREATE OBJECT g_ref.
      CALL METHOD g_ref->diff
        EXPORTING
          i_date_fm = g_date_fm
          i_date_to = g_date_to
        IMPORTING
          e_days    = g_days.
      WRITE g_days.

  • Group by week between date range

    Hi,
    i'm having a table for documents. The documents are received from diffeent dates. I've to calculate number of documents received on weekly basis.
    I need an sql to count the number of documents between two given dates grouping by weekly.
    My week starts on Sunday and ends with Saturday.
    I've tried group by with to_char(documentdate,'IW') , but this will take Monday to Sunday as a week & the incomlete weeks i'm not able to calculate. ie : in the below output the date range 1/28/2007 - 1/31/2007 is not a complete week . ( ie saturday to wednesday)
    I need out put should be like this for Date Range: 12/31/2006 to 1/31/2007
    week               count of documents
    12/31/2006 - 1/6/2007 10
    1/7/2007 - 1/13/2007     40
    1/14/2007 - 1/20/2007     30
    1/21/2007 - 1/27/2007     20
    1/28/2007 - 1/31/2007 10
    Please help me to get this.....
    (columns in documents table is documentid and documentdate)

    your're very close with IW. you just need to shift the data to get it to fall within the correct range. btw, you don't need julian dates. it's overkill
    trunc(date+1,'IW') will push the date into the correct week range (IW will put sunday one week earlier than you want, so push it ahead a day before truncating).
    then subtract 1 day from the result to get it to display with sunday's date instead of monday
    trunc(mydate+1, 'IW')-1
    and the week end date is simply trunc(mydate+1, 'IW')_5
    select mydate, to_char(mydate,'Dy') dy,
    trunc(mydate+1,'IW')-1 wk_Start,
    trunc(mydate+1,'IW')+5 wk_end
    from (select sysdate-rownum mydate from dual connect by level < 20)
    order by 1

  • Using analytical function to calculate concurrency between date range

    Folks,
    I'm trying to use analytical functions to come up with a query that gives me the
    concurrency of jobs executing between a date range.
    For example:
    JOB100 - started at 9AM - stopped at 11AM
    JOB200 - started at 10AM - stopped at 3PM
    JOB300 - started at 12PM - stopped at 2PM
    The query would tell me that JOB1 ran with a concurrency of 2 because JOB1 and JOB2
    were running started and finished within the same time. JOB2 ran with the concurrency
    of 3 because all jobs ran within its start and stop time. The output would look like this.
    JOB START STOP CONCURRENCY
    === ==== ==== =========
    100 9AM 11AM 2
    200 10AM 3PM 3
    300 12PM 2PM 2
    I've been looking at this post, and this one if very similar...
    Analytic functions using window date range
    Here is the sample data..
    CREATE TABLE TEST_JOB
    ( jobid NUMBER,
    created_time DATE,
    start_time DATE,
    stop_time DATE
    insert into TEST_JOB values (100, sysdate -1, to_date('05/04/08 09:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 11:00:00','MM/DD/YY hh24:mi:ss'));
    insert into TEST_JOB values (200, sysdate -1, to_date('05/04/08 10:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 13:00:00','MM/DD/YY hh24:mi:ss'));
    insert into TEST_JOB values (300, sysdate -1, to_date('05/04/08 12:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 14:00:00','MM/DD/YY hh24:mi:ss'));
    select * from test_job;
    JOBID|CREATED_TIME |START_TIME |STOP_TIME
    ----------|--------------|--------------|--------------
    100|05/04/08 09:28|05/04/08 09:00|05/04/08 11:00
    200|05/04/08 09:28|05/04/08 10:00|05/04/08 13:00
    300|05/04/08 09:28|05/04/08 12:00|05/04/08 14:00
    Any help with this query would be greatly appreciated.
    thanks.
    -peter

    after some checking the model rule wasn't working exactly as expected.
    I believe it's working right now. I'm posting a self-contained example for completeness sake.I use 2 functions to convert back and forth between epoch unix timestamps, so
    I'll post them here as well.
    Like I said I think this works okay, but any feedback is always appreciated.
    -peter
    CREATE OR REPLACE FUNCTION date_to_epoch(p_dateval IN DATE)
    RETURN NUMBER
    AS
    BEGIN
    return (p_dateval - to_date('01/01/1970','MM/DD/YYYY')) * (24 * 3600);
    END;
    CREATE OR REPLACE FUNCTION epoch_to_date (p_epochval IN NUMBER DEFAULT 0)
    RETURN DATE
    AS
    BEGIN
    return to_date('01/01/1970','MM/DD/YYYY') + (( p_epochval) / (24 * 3600));
    END;
    DROP TABLE TEST_MODEL3 purge;
    CREATE TABLE TEST_MODEL3
    ( jobid NUMBER,
    start_time NUMBER,
    end_time NUMBER);
    insert into TEST_MODEL3
    VALUES (300,date_to_epoch(to_date('05/07/2008 10:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 19:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (200,date_to_epoch(to_date('05/07/2008 09:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 12:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (400,date_to_epoch(to_date('05/07/2008 10:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 14:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (500,date_to_epoch(to_date('05/07/2008 11:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 16:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (600,date_to_epoch(to_date('05/07/2008 15:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 22:00','MM/DD/YYYY hh24:mi')));
    insert into TEST_MODEL3
    VALUES (100,date_to_epoch(to_date('05/07/2008 09:00','MM/DD/YYYY hh24:mi')),
    date_to_epoch(to_date('05/07/2008 23:00','MM/DD/YYYY hh24:mi')));
    commit;
    SELECT jobid,
    epoch_to_date(start_time)start_time,
    epoch_to_date(end_time)end_time,
    n concurrency
    FROM TEST_MODEL3
    MODEL
    DIMENSION BY (start_time,end_time)
    MEASURES (jobid,0 n)
    (n[any,any]=
    count(*)[start_time<= cv(start_time),end_time>=cv(start_time)]+
    count(*)[start_time > cv(start_time) and start_time <= cv(end_time), end_time >= cv(start_time)]
    ORDER BY start_time;
    The results look like this:
    JOBID|START_TIME|END_TIME |CONCURRENCY
    ----------|---------------|--------------|-------------------
    100|05/07/08 09:00|05/07/08 23:00| 6
    200|05/07/08 09:00|05/07/08 12:00| 5
    300|05/07/08 10:00|05/07/08 19:00| 6
    400|05/07/08 10:00|05/07/08 14:00| 5
    500|05/07/08 11:00|05/07/08 16:00| 6
    600|05/07/08 15:00|05/07/08 22:00| 4

  • List in between date range

    i'm having data stored as follows
    DEPOT_CODE EMP_ID ACTIVE_FROM ACTIVE_TO
    400 68955 01-JAN-08 31-JAN-09
    400 68962 01-JAN-08 20-JAN-08
    400 68999 01-JAN-08
    400 689600 01-JAN-08
    400 684530 01-JAN-08
    I wanted to list all the records active in between given date range even though active_to is null
    i.e if i give 10/01/2008 to 02/02/2008
    i want to display all the records which is shown in above
    Thanking you

    Lakmal, I wouldn't take advise from Bhaskar on this one, as he clearly does
    not know how to work with dates, and also does not grasp the concept of a
    date range.
    You have a range, and you want to check if it covers (in whole or in part)
    the from-to period, right?
    I changed the data to include a row (first one) not to be output.
    with dummy as (
    select 400 depot_code, 68955 emp_id, to_date('01-JAN-08', 'DD-MON-YY') active_from, 
        to_date('05-JAN-08', 'DD-MON-YY') active_to from dual union all
    select 400 depot_code, 68955 emp_id, to_date('01-JAN-08', 'DD-MON-YY') active_from, 
        null active_to from dual union all 
    select 400 depot_code, 68955 emp_id, to_date('01-JAN-08', 'DD-MON-YY') active_from, 
        to_date('31-JAN-09', 'DD-MON-YY') active_to from dual union all
    select 400 depot_code, 68962 emp_id, to_date('01-JAN-08', 'DD-MON-YY') active_from, 
        to_date('20-JAN-08', 'DD-MON-YY') active_to from dual union all
    select 400 depot_code, 68999 emp_id, to_date('01-JAN-08', 'DD-MON-YY') active_from, 
        null active_to from dual
    select *
    from dummy
    DEPOT_CODE     EMP_ID ACTIVE_FR ACTIVE_TO
           400      68955 01-JAN-08 05-JAN-08
           400      68955 01-JAN-08         
           400      68955 01-JAN-08 31-JAN-09
           400      68962 01-JAN-08 20-JAN-08
           400      68999 01-JAN-08         
    5 rows selected.
    SELECT *
      FROM dummy
    WHERE NVL (active_to, TO_DATE ('10-JAN-08', 'DD-MON-YY')) >=
                   TO_DATE ('10-JAN-08', 'DD-MON-YY')
                   AND active_from <= to_date('02-FEB-08', 'DD-MON-YY')
    DEPOT_CODE     EMP_ID ACTIVE_FR ACTIVE_TO
           400      68955 01-JAN-08         
           400      68955 01-JAN-08 31-JAN-09
           400      68962 01-JAN-08 20-JAN-08
           400      68999 01-JAN-08         
    4 rows selected.given that active_from is never null.
    Isn't it as simple as this? The active_to must be after your start_date,
    and the active_from must be before the end....

  • Parameter prompts-  Displaying task details between date range

    Hi all,
    I have created a report ( Crystal reports 2008) which lists task related details( distinct count) by region, customer and work type. I created two parameters to let the users specify the date ranges. Based on the user inputs, the title of the report would be " there are -- tasks between the user specified date ranges//-- and -//".  I am not sure how to go about displaying the title in the format specified.
    It would be great if you guys could give me your suggestions on this.
    Thanks a lot,
    Vinne
    Edited by: Vinnie_uic on Jun 8, 2010 9:32 AM

    Hi, I don't have 2008, but this should still work.
    You can add your text as shown.
    " there are   tasks between the user specified date ranges and  "
    Add your parameters to the report, also add a counter for your tasks.
    then you just drag and drop those into the title.
    When you edit the title it "May" look like this.
    "There are {@Count_of_Tasks}  tasks between the user specified date ranges {?Start_date} and {?End_Date} "
    but it should display as
    "There are 15  tasks between the user specified date ranges 5/20/2010  and 5/17/2010 "
    If that does not work for you, use the & sign, and create your formula like this.
    There are &" "& {@Count_of_Tasks}&" "&  tasks between the user specified date ranges &" "&{?Start_date} and&" "& {?End_Date}
    I hope the formatting is correct for 2008

  • Data between Date Range with Business Days only

    Hi All,
    We have a requirement that we need to retrieve data between a data range, providing From date and To date as input.
    We also have the option to Include Business Days Only through a check box which will be passed to CR 2008 through a report frame work.
    Can some one help me how to display the report data within the Date Range entered and that includes only Business Days.
    Thanks in advance for the help.
    Regards,
    Naresh.

    try this formula. Lets if your date range parameter is {?date} then try this formula
    @startdate:
    if datepart('w',minimum({?date}))=7 then
    minimum({?date})+2
    else if datepart('w',minimum({?date}))=1 then
    minimum({?date})+1
    else
    minimum({?date})
    @enddate
    if datepart('w',maximum({?date}))=7 then
    maximum({?date})+2
    else if datepart('w',maximum({?date}))=1 then
    maximum({?date})+1
    else
    maximum({?date})
    regards,
    Raghavendra

  • Need JavaScript for Sharepoint Designer 2010, to show a Pop-up to all the users between date range and the redirect the site

    Dear all,
    I am very new to Sharepoint designer 2010. Its better to say, i am just stepping in.
    I have sharepoint site which is accessible for all the users to update few information. But i want this site not to be accessible during a date range, say from 15th to 20th of every month.
    I am planning to have something like this: If any user tries to access this sharepoint site between 15th to 20th date range of everymonth, then the browser must show an pop-up alert saying "This site is not accessible during this date range" and Redirect
    this sharepoint site to someother site (Say http:// somesitename.xx.com) immidiately.
    I know very little about how to add Javascript in sharepoint webpart.
    Please provide the Javascript or any best alternate solution to my concern.
    Thanks in advance.

    Hi,
    From your description, my understanding is that you want to redirect sharepoint site to another site between 15th and 20th every month.
    I agree with what Sudip says. If you still want to use JS code,You could try these steps
    below:
    Open your site with SharePoint Designer.
    Click Master Pages in left navigation.
    Find file v4.master, and backup it(it is very important).
    Right click your v4.master,
    choose "Edit File in Adavance Mode".
    Add the code below into the <head/> tag.
    <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script
    type="text/javascript">
    $(document).ready(function(){
    var today = new Date();  
    var day = today.getDate(); // get current day
    var id = _spPageContextInfo.userid; // get the id of current logon in user
    var boolFlg = false;
    $.ajax({
       url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteGroups/GetByName(\'"+"sharepoint Owners"+"\')/Users", //get users in a specified group can access the sharepoint site from 15th to 20th every
    month
       type: "GET",
       headers: {"accept": "application/json;odata=verbose"},
       success: function (data) {
          if (data.d.results) { 
             var src = data.d.results;
             for(var i = 0; i < src.length; i++){
                if(src[i].userid==id){ //check the logon in user in  the specified group or not
                   boolFlg = false;
                   break;
             if(!boolFlg){
                if(day <= 20 && day >=15){
                    alert("This site is not accessible during this date range"); // alert the message
                    location.href = "http:// somesitename.xx.com"; // redirect to another site
       error: function (xhr) {
          alert(xhr.status + ': ' + xhr.statusText);
    })</script>
    Best Regards
    Vincent Han
    TechNet Community Support

  • Display all dates between date range (Time Dimension left outer join Fact)

    All,
    I have done some searching around this issue but within all the posts regarding date variables, date prompts and date filtering I haven't seen one exactly answering my issue (maybe they are and I just dont have my head around it correctly yet).
    My report requirement is to allow a user to select a start day and an end day. The report should show all activity between those two days - AND display 0/null on days where there is no activity. That second part is where I am getting hung up.
    The tables in question are:
    TimeDim
    EventFact
    CustomerDim
    My BMM is setup as follows:
    TimeDim left outer join EventFact
    CustomerDim inner join EventFact
    If I run a report selecting DAY from TimeDim and a measure1 from EventFact with day range 1/1/2010 - 12/31/2010 .. I get a record for every day and it looks perfect because of the left outer join between TimeDim and CustomerDim.
    But .. if I add in a field from CustomerDim, select TimeDim.DAY, CustomerDim.CUSTNAME, EventFact.MEASURE1, OBIEE only returns records for the days that have EventFact records.
    This is due to the fact that the TimeDim is still outer joined into EventFact but adding in CustomerDim makes OBIEE setup an inner join between those tables which then causes only data to be returned where EventFact data exists.
    There is a way around this in this simple case and that is to define the relationship between CustomerDim and EventFact as an outer join as well. This will give the desired effect (but an outer join between these two tables is not the true relationship) and as I add additional dimensions and add additional logical sources to a single dimension in the BMM it gets complicated and messy.
    Ive also messed with setting the driving table in the relationship, etc.. but it has not given the desired effect.
    Has anyone ever encountered the need to force display all dates within a specfied range with a fact table that may not have an entry for every date?
    Thanks in advance.
    K
    Edited by: user_K on Apr 27, 2010 11:32 AM

    It worked!!!* Even my time drill downs and date based filtering still work!
    That is awesome. Never would have thought of that intuitively.
    Now, just need a little help understanding how it works. When I run my report and check the logs I can see that two queries are issued:
    Query 1: Joins the fact table to all the associated dimensions. I even changed all the relationships to inner joins (which is what they truly are). And calculates the original measure. If I copy and paste this query into sql developer it runs fine but only returns those rows that joined to the time dimension - which is what was happening before. It is correct but I wanted a record for every time dimension record.
    Query 2: Looks like the following:
    select sum(0)
    from timedim
    where date between <dateprompt1> and <dateprompt2>
    group by month *<--* this is the time dimension level specified in Query 1, so it knows to aggregate to the month level as was done in query 1
    Final Question: So what is OBIEE doing ultimately, does it issue these two requests and then perform a full outer join or something to bring them together? I couldn't see anywhere in the log a complete query that I could just run to see a similar result that I was getting in Answers.
    Thanks for all the help .. Id give more points if I could.
    K

  • Export Mail to pst between date range with Messagekind eq Email

    Exchange 14.2 247.5
    I am trying to export all mail from a piped list of mailboxes but only between two dates. I can do one or the other, but not combine both contentfilters - can anyone offer any advice as to what I'm doing wrong? I've played with different combinations of
    brackets but I can't get it do do an -and for some reason. My spreadsheet has columns for alias and pstpath - this part is fine, I just can't get it to evaulate both contentfilters. My short script:
    foreach ($i in (Import-Csv c:\temp\export\mailtest.csv)) { 
    New-MailboxExportRequest -Mailbox $i.Alias -FilePath $i.PSTpath -ContentFilter {(Received -lt '07/18/2014') -and (Received -gt '06/18/2014')} {MessageKind -eq Email}
    I'm also running a script to shift all calendars and contacts (not date limited) to pst but am running this seperately. If these can be combined then great, but I'm happy to run two commands.
    THanks
    James.

    No joy still with that either. Running Get-MailboxExportRequestStatistics -Identity MaibloxName\MailboxExport
    -IncludeReport | Format-List gives the error message:
    AssociatedMessagesCopyOption  : DoNotCopy
    BatchName                     :
    ContentFilter                 : ((((Received -lt '18/07/2014 12:00:00 AM') -and (Received -gt '18/06/2014 12:00:00 AM')
                                    )) -and (MessageKind -eq 'Email'))
    ContentFilterLanguage         :
    BadItemLimit                  : 0
    BadItemsEncountered           : 0
    QueuedTimestamp               : 19/07/2014 3:18:11 PM
    StartTimestamp                :
    LastUpdateTimestamp           : 19/07/2014 3:18:15 PM
    CompletionTimestamp           :
    SuspendedTimestamp            :
    OverallDuration               : 00:00:15
    TotalSuspendedDuration        :
    TotalFailedDuration           : 00:00:12
    TotalQueuedDuration           : 00:00:03
    TotalInProgressDuration       : 00:00:00
    TotalStalledDueToHADuration   :
    TotalTransientFailureDuration :
    MRSServerName                 :
    EstimatedTransferSize         : 0 B (0 bytes)
    EstimatedTransferItemCount    : 0
    BytesTransferred              : 0 B (0 bytes)
    BytesTransferredPerMinute     :
    ItemsTransferred              : 0
    PercentComplete               : 0
    PositionInQueue               :
    FailureCode                   : -2146233088
    FailureType                   : InvalidContentFilterPermanentException
    FailureSide                   :
    Message                       : Error: ContentFilter is invalid. The value "18/07/2014 12:00:00 AM" could not be conver
                                    ted to type System.DateTime. --> The value "18/07/2014 12:00:00 AM" could not be conver
                                    ted to type System.DateTime.
    FailureTimestamp              : 19/07/2014 3:18:15 PM
    FailureContext                :
    I am in AU using English (australia) and so using dd/mm/yyyy short date format but understand that this is irrelevant and we use mm/dd/yyyy for powershell operations. 
    The command I am using is:
    New-MailboxExportRequest -Mailbox $i.Alias -FilePath $i.PSTpath -ContentFilter {((Received -lt '07/18/2014') -and (Received -gt '06/18/2014') -and (MessageKind -eq "Email"))}
    I don't understand why this is failing...

  • Generating Dates Between Date Range

    Hi,
    I have a table with test_id, a_id, start_date, end_date like the below.
    test_id a_id start_date end_Date
    861 2123 05-Dec-2009 10-Dec-2009
    861 2124 06-Dec-2009 09-Dec-2009
    864 2123 08-Dec-2009 10-Dec-2009
    864 2124 07-Dec-2009 11-Dec-2009
    I need to generate dates between the start_date and end_date like the below. Kindly help.
    test_id a_id start_date end_Date tdate
    861 2123 05-Dec-2009 10-Dec-2009 05-Dec-2009
    861 2123 05-Dec-2009 10-Dec-2009 06-Dec-2009
    861 2123 05-Dec-2009 10-Dec-2009 07-Dec-2009
    861 2123 05-Dec-2009 10-Dec-2009 08-Dec-2009
    861 2123 05-Dec-2009 10-Dec-2009 09-Dec-2009
    861 2123 05-Dec-2009 10-Dec-2009 10-Dec-2009
    861 2124 06-Dec-2009 09-Dec-2009 06-Dec-2009
    861 2124 06-Dec-2009 09-Dec-2009 07-Dec-2009
    861 2124 06-Dec-2009 09-Dec-2009 08-Dec-2009
    861 2124 06-Dec-2009 09-Dec-2009 09-Dec-2009
    864 2123 08-Dec-2009 10-Dec-2009 08-Dec-2009
    864 2123 08-Dec-2009 10-Dec-2009 09-Dec-2009
    864 2123 08-Dec-2009 10-Dec-2009 10-Dec-2009
    864 2124 07-Dec-2009 11-Dec-2009 07-Dec-2009
    864 2124 07-Dec-2009 11-Dec-2009 08-Dec-2009
    864 2124 07-Dec-2009 11-Dec-2009 09-Dec-2009
    864 2124 07-Dec-2009 11-Dec-2009 10-Dec-2009
    864 2124 07-Dec-2009 11-Dec-2009 11-Dec-2009
    Please reply at the earliest. Its very urgent. Thanks in advance.
    Regards,
    Gayathri Devi

    with t
    as
    select 861 test_id, 2123 a_id, to_date('05-Dec-2009','dd-mon-yyyy') start_date, to_date('10-Dec-2009','dd-mon-yyyy') end_date from dual union all
    select 861, 2124, to_date('06-Dec-2009','dd-mon-yyyy'), to_date('09-Dec-2009','dd-mon-yyyy') from dual union all
    select 864, 2123, to_date('08-Dec-2009','dd-mon-yyyy'), to_date('10-Dec-2009','dd-mon-yyyy') from dual union all
    select 864, 2124, to_date('07-Dec-2009','dd-mon-yyyy'), to_date('11-Dec-2009','dd-mon-yyyy') from dual
    select test_id, a_id, start_date, end_date, start_date+no-1 dt
      from t
      cross join
    select level no
      from dual
    connect by level <= (select max(end_date-start_date+1) from t)
    where case when start_date+no-1 > end_date then null else start_date+no-1 end is not null
    order by 1,2,5

  • 10g between dates range

    Good day,
    Entered data -
    create global temporary table TEMP_IN_DATA
    FACILITY CHAR(2),
    METER CHAR(3),
    START_DATE DATE,
    VALUE NUMBER
    facility / meter / start_date / dt_fim / valor
    'CP1' / 'MT1' / TO_DATE('01/03/2009', 'DD/MM/YYYY') / 5
    'CP2' / 'MT2' / TO_DATE('02/03/2009', 'DD/MM/YYYY') / 9
    'CP3' / 'MT3' / TO_DATE('03/03/2009', 'DD/MM/YYYY') / 76
    'CP4' / 'MT4' / TO_DATE('04/03/2009', 'DD/MM/YYYY') / 55
    START_DATE value -
    Start_Date will come dynamicly from DateTimePicker from Win application coded in C#.
    Expected value -
    Query will display all in one:
    1) VALUE for select date from DateTimePicker
    2) it will display sum of VALUES from begining of that month(month that is coming from DateTimePicker) and selected START_DATE from DateTimePicker
    3) it will display the difference of values for selected day(DateTimePicker) and previous day ( -1)
    Thanks in advance!
    Edited by: user12029096 on 08.10.2009 13:36

    user12029096 wrote:
    But second date will start from start of august month. Query will denept on month of first date. So second date stamp will start from beginning of month. How can i do this in best mannerI'm sorry but that does not make any sense to me. Can you please provide the following?
    1. Sample data in the form of DDL/DML
    2. Expected output.
    3. Use \ tags for #2 and #3 to preserve formatting. See FAQ for instructions on using tags.
    Thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Report for open invoice value against GR done within a date range

    Dear experts ,
    I need a report  between date ranges for which there is a GR done , but invoice is pending .
    Where can i get this ? 
    Regards
    Anis

    hi,
    You can  check few default PO reports wid proper paramater in it
    or
    Can check table EKBE
    or
    Check PO history in the PO doc
    Or
    Check the ME80FN
    Regards
    Priyanka.P

  • Date Range Selection

    Dear friends,
    How to select the record from BSEG table between Date range. Please give me the solution . Am also try to find the solution in SDN also.
    select-options post_dt for bkpf-budat obligatory default sy-datum NO-EXTENSION.
    select belnr budat from bkpf into corresponding fields of table it_head
        where bukrs eq compcode
        and gjahr eq year
        and blart eq doctype
        and budat in post_dt
        order by belnr budat.
    For this select query is working in perfect for single date only. But i want to select the date date range wise.
    Thanks
    Saravanan R

    HI,
           U can check the Select Quert by using IN s_option.
    Like eg:--
        Select * form Zemp where empno in s_empno.
    Hope this example will help u...
    here Zemp is a table...... empno is a field     s_empno is a Select-option.
    Thanks and rEgards
    Suraj S Nair

Maybe you are looking for

  • Exception write to event log when user not found in active directory

    I'm trying to use a exception to write to a event log to show which user did not get imported from my csv file. Any help to write this exception is appreciated. Thanks Import-CSV $importfile | ForEach-Object{ $samaccountname = $_.sAMAccountName.ToLow

  • Pass parameter from OnInitialisation to OnInputProcessing

    Hi, I have asked this before but I closed that thread and awarded all the points. I'm still having trouble with it, so I post it again for clarification. I have a BSP, a.bsp in the Page Attributes I have a parameter error1 which is a string with the

  • How can I add a condition to the MIN function?

    is there a MIN "conditional" function, something like a MIN.IF (just like AVERAGE.IF), to find the minimum value meeting a certain condition? Or, what should I do to obtain the same result? Thank you!

  • PO Item instructions in ORDRSP

    Hi All,        I have a requirement where I have to include “PO Item Instructions – EDI 1” on the ORDRSP IDOC at the line item level and I should not include the segment if the “PO Item Instructions” – EDI 1 text field is empty?      Neither I worked

  • Flex to VB

    I am trying to use ExternalInterface to pass data between a swf file and VB in Visual Studio 2008. I have the swf file in the vb form. This is my actionscript code, initiated by a button click: import flash.external.*; public function send2VB(txt:Str