How to Find difference of cal day Period

Hi Friends,
How to get difference of cal day in period.
example is 01/01/2008 - 31/01/2008 = Number of dates
This query is in inventory to calulate average of issues and receipts in the particulat period.
Please help me any one.
Thanks and regards,

HI,
Create two replacement typr formula variables for this two characterictics dates , keep in mind while creating the repl path variable assign currency/unit as date.
Then just calculate the difference using a formula .. U can use DATE function (in the data function) in the formula though it should work without DATE function.
Hope it helps,
Assign pts if helpful..

Similar Messages

  • How to find first and last day of previous month?.

    Based on current month, I want to find start and end day of
    previous month.
    For example,
    For august, Start date is July 1st and End date July 31st.
    How can i get first of previous month as start date and last
    day of the previous month as end date?.
    Same way,
    i want to find start date of current month and end date of
    next month.
    Example:
    For august,
    i want to get start date, august 1st and end date : september
    30.
    How can i do this from current date or now().
    I am looking for best and easy way to find start and end
    dates..
    Thanks

    <cfset today = now()>
    <cfset firstOfThisMonth = createDate(year(today),
    month(today), 1)>
    <cfset lastOfNextMonth = dateAdd("d", -1, dateAdd("m", 2,
    firstOfThisMonth))>
    <cfoutput>
    today = #today#<br>
    firstOfThisMonth = #firstOfThisMonth#<br>
    lastOfNextMonth = #lastOfNextMonth#<br>
    </cfoutput>
    Edit - To find the start and end day of previous month, get
    the first of THIS month. Use Subtract 1 month ("m") to get the
    start date. Subtract 1 day ("d") to get the end date.

  • How to find history in specific day?

    I want to find history in specific day. But in History window, I only see options such as: Today, yesterday, Last 7 day, Last month.... and have no option for search in specific day. How can I do this?

    A possibility is to use this NirSoft utility.
    *http://www.nirsoft.net/utils/browsing_history_view.html
    You can use the SQLite Manager extension to create the list.
    * SQLite Manager: https://addons.mozilla.org/firefox/addon/sqlite-manager/
    # Open Profile Directory -> places.sqlite -> Go
    # Hit the "Execute SQL" tab
    # Use a Select like this:
    <pre><nowiki>
    SELECT datetime(visit_date/1000000,'unixepoch','localtime') AS visit_date, url, title, visit_count, frecency
    FROM moz_places, moz_historyvisits
    WHERE moz_places.id = moz_historyvisits.place_id AND visit_date BETWEEN strftime('%s','2014-MM-DD 00:00:00')*1000000 AND strftime('%s','2014-MM-DD 23:59:59')*1000000
    ORDER BY visit_date, url
    </nowiki></pre>
    The date/time in strftime needs to be entered in UTC
    Click Run SQL to generate a results list

  • PPOME - New Tab & Infotype - How to find "start date" of preview period

    Hi all,
    I have successfully created own Infotype and add as new tab in PPOME.
    But now I need in my modulpool program to read field "start date" of preview period (from heading of screen in PPOME). I can't find right field. Has anybody any idea?
    Thanks a lot.
    Dusan
    Message was edited by:
            Dusan Skokanek

    Hi ramprasad74,
    According to your description, you are using Analysis Services as a data source for the report, the cube has hierarchy: Fyear, FQuarter, FPeriod, fweek, Fdate. You want to add a date parameter to the report, after you changed value of the parameter, the
    report will return the first day of FPeriod.
    To achieve your goal, we need to add a parameter to the report, then use the parameter in mdx query. For detail information, please refer to the following steps:
    In the Report Data pane, right-click on a dataset created from a SQL Server Analysis Services data source type, and then click Query. The MDX query designer opens in Design mode.
    On the toolbar, click Design to toggle to Query mode.
    On the MDX query designer toolbar, click Query Parameters symbol. The Query Parameters dialog box opens.
    In the Parameter column, click <Enter Parameter>, and then type the name of a parameter.
    In the Dimension column, choose a value from the drop-down list.
    In the Hierarchy column, choose a value from the drop-down list.
    In the Default column, from the drop-down list, select a single value.
    Click OK. 
    In query designer dialog box, type the mdx query like below:
    with member [Measures].[FirstChild]
    as
    [Date].[Fiscal].currentmember.parent.firstchild.name
    select {[Measures].[FirstChild]} on 0,
    [Date].[Fiscal].[Date].members on 1
    from
    ( SELECT ( STRTOSET(@ParameterName, CONSTRAINED) ) on 0
    from
    [Cube]
    Here are relevant threads you can reference:
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/c7146ac3-40ea-4d53-b321-c707aebbd405/how-to-pass-date-parameter-to-mdx-query
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/fd12a865-bc90-4a65-af42-ce38a8cfa29b/pass-date-time-parameter-to-mdx-query-ssrs
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

  • How to find first and last day of last month?.

    Hello,
    I am using Crystal Report XI.
    Reports will be generated on first of every month for
    previous month. I want to find start and end date of previous month
    dynamic.
    For august, Start date is July 1st and End date July 31st.
    For September, start date is Aug 1st and Aug 31st.
    How can i get first of previous month as start date and last
    day of the previous month as end date?.
    Same kind of thing I want to do for future report ..find next
    month start date and end date.
    Thanks

    Adomacro,
    you could do a function, like this
    <cffunction name="getReportdates" returntype="struct"
    hint="Given an arbitrary month and year, the function returns a
    structure containing the first and last day of the previous
    month">
    <!--- Take current month and current year as the default
    --->
    <cfargument name="mnth" type="string" required="No"
    default="#monthAsString(month(now()))#">
    <cfargument name="yr" type="numeric" required="No"
    default="#year(now())#">
    <cfset firstDayOfGivenMonth = parseDateTime("1 " &
    arguments.mnth & " #arguments.yr#")>
    <cfset lastDayOfPreviousMonth =
    dateAdd("d",-1,firstDayOfGivenMonth)>
    <cfset numberOfDaysOfPreviousMonth =
    daysInMonth(lastDayOfPreviousMonth)>
    <cfset firstDayOfPreviousMonth =
    dateAdd("d",-#numberOfDaysOfPreviousMonth#,firstDayOfGivenMonth)>
    <cfset reportDates = structNew()>
    <cfset reportDates.firstDayOfPreviousMonth =
    firstDayOfPreviousMonth>
    <cfset reportDates.lastDayOfPreviousMonth =
    lastDayOfPreviousMonth>
    <cfreturn reportDates>
    </cffunction>
    <!--- Example usage --->
    <p>
    Given month: <strong>March
    2004</strong><br>
    begin date:
    <cfoutput>#dateFormat(getReportdates('March',2004).firstDayOfPreviousMonth,"d
    mmm yyyy")#</cfoutput><br>
    end date:
    <cfoutput>#dateFormat(getReportdates('March',2004).lastDayOfPreviousMonth,"d
    mmm yyyy")#</cfoutput><br>
    </p>
    <p>
    Given month: <strong>August
    2007</strong><br>
    begin date:
    <cfoutput>#dateFormat(getReportdates('August',2007).firstDayOfPreviousMonth,"d
    mmm yyyy")#</cfoutput><br>
    end date:
    <cfoutput>#dateFormat(getReportdates('August',2007).lastDayOfPreviousMonth,"d
    mmm yyyy")#</cfoutput><br>
    </p>

  • How to find all the dates btween period

    hallow
    i had to find how much month and year i have btween dates
    in month and i have to append it to my table.
    i give ex.
    if begda = 01.01.2005
    end endda = 01.06.2007
    i wont to append to period_tbl
    01012007
    01022007
    01032007
    until 01.06.2007
    i try with that and it working when dats less then one year but i have problem when i choose dates that more then one year like in example.
    <b>i reward kindly</b>
    Regards
    CALL FUNCTION 'HR_AUPBS_MONTH_DAY'
    EXPORTING
    beg_da = p_begda
    end_da = p_endda
    IMPORTING
    no_day = l_day
    no_month = l_month
    no_year = l_year.
    period_tbl-period = p_begda(6).
    APPEND period_tbl.
    MOVE p_begda(6) TO month_tmp.
    DO l_month TIMES.
    period_tbl-period = month_tmp + sy-index.
    APPEND period_tbl.
    ENDDO.

    Hello Antonio,
      I would add the following (in bold):
    period_tbl-period = p_begda(6).
    APPEND period_tbl.
    <b>data l_month_in_years like P0000_AF-NOMNS
    l_month_in_years = l_year * 12.
    add l_month_in_years to l_month.</b>
    DO l_month TIMES.
    by the way, I think the function is HR_CALC_YEAR_MONTH_DAY
    Let me know if that worked,
    Regards

  • How to find difference of files between 2 checkpoints in a virtual machine

    hi ,
    i had 2 checkpoint . certain fucntionality works in one and  not  in other checkpoint .
    Same files are copied to 2 checkpoints . 
    IIS webserver /.net framework i guess might be corrupted . how do we find the difference in files between 2 checkpoints .

    Checkpoints are binary differences between two states of the VM thus there's no concept of change as it relates to file level or configuration level changes to track and I can't imagine really trying to find a difference between the two in this way.
    If this relates to creating a base/reference OS image, it's just another reason to use a build and caputre task sequence so that you always have a freshly built and clean image that is easily recreated.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How to find RETRO in a given period

    Dear freinds,
                 Iam doing a payroll report relating to bonus,i would like to check in my coding the retro caculation , iam not sure how we should check the retro calcuation . IF any function module is there
    where we can check after reading the payroll result (PYXX_READ_PAYROLL_RESULT) . It would be great help ./
    regards
    divya

    This is not easy to answer and what others have reported here is not cutting it either. First you need to know how payroll results are built and how the retro-status indicator is being used (A, P, O). Then you need to know how the different payroll clusters work, the cluster directory and the result cluster. Just checking for /551 and other retro wage types is not the way to go as these are only represent if there are differences of a certain kind. If you do not understand the structure of payroll results you should avoid trying this.
    For experts it is enough to look into HRPY_RGDIR to look for the corresponding results.
    For introductions of what you need look for the following:
    SAP Online Help: Retroactive Accounting With SAP HR Payroll
    Classes: HR350 Programming in HR

  • Function Module to find difference of Fiscal Year period

    Hi,
    I have a requirement wherein a user enters 2 variables for Start and End Fiscal year period and I need  to calculate the difference ( ie: I need to calculate the number of periods ).
    I also need to pass the Fisc Year variant 'K4' as the Input parameter.
    Any standard function module for it?
    Rgds
    Shyam

    DATA: I_FYV1 LIKE T009-PERIV.
      CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
        EXPORTING
         COMPANY_CODE           = i_billno-bukrs
         COMPANY_CODE           = S_BUKRS-LOW
        IMPORTING
          FISCAL_YEAR_VARIANT    = I_FYV1
       EXCEPTIONS
         COMPANY_CODE_NOT_FOUND = 1
         OTHERS                 = 2.
    IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'ME_DETERMINE_GJAHR'
       EXPORTING
      I_BSTYP         =
          I_BEDAT         = P_DATE
         I_PERIV         = I_FYV1
      IMPORTING
      E_H_MONAT       =
        E_H_GJAHR       = GJAHR1
      E_H_DATUM       =

  • How to find difference in amount between two fields in two different tables

    Hi,
    I am new to PL/SQL. I need to write a procedure to calculate the difference between two columns of two seperate tables. For example:
    I have Table a and Table b. Both with two columns Id and Amount. I need to find the difference of Amount between table a and table b value for each record in table b, store it in variable and then do further operations using that difference. Kindly help me with this.

    Something like this?
    INSERT INTO table_c (id, diff, p_or_n)
    SELECT
    a.a_id,
    a.a_value - b.b_value
    DECODE( SIGN(a.a_value - b.b_value),
      1 , 'P',
      0 , 'P',
      -1, 'N'
    FROM table_a a JOIN table_b b
    ON (a.a_id = b.b_id);
    -- Ranit

  • How to find difference btw time?

    hi,
    Can any one tell me are there any function modules to perform add, diff(minus) operation on time fields?
    please let me know if you know any.
    thanks in advance,
    Prasad Babu.

    Hi,
    Try <b>CCU_TIMESTAMP_DIFFERENCE</b>
    CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'        
          EXPORTING                                  
               timestamp1 = timestamp1               
               timestamp2 = timestamp2               
          IMPORTING                                  
               difference = diff                     
          EXCEPTIONS                                 
               OTHERS     = 1.
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/f-module-for-dates-subtraction-124376#
    Check out these threads
    date time difference
    FM to Difference between two data and time in tims data type
    Regards,
    Santosh

  • How to find differences between two columns

    Hello I need the formula to spot differences between two columns and to write on a third one if the same name appear on the two columns.
    For example:
    rome berlin true
    berlin moscow false
    chicago toronto true
    toronto chicago true
    florence
    Thanks
    Lorenzo

    You should be able to use COUNTIF where the range is th first column and the condition is the word in the second column. If the result is greater than zero then the word is in both columns.

  • How to find difference in two tables

    Hi all,
    I am having 2 tables (Table1 and Table2 ) same structure.
    1. Table1 is having some data.
    2. Now, i got data in CSV file, which was loaded into Table2.
    This data contains....
    A. Data of Table1
    B. Some colum values are different compare to Table1 column values.
    (Pkey is same, but column values are different in Table1 and Table2)
    C. Additional rows are there compared to Table1.
    Now, what i want is......
    I want to select the data from Table2,
    1. The rows in which column values are different from the Table1
    2. New records added from CSV file (i.e. Those records that are not
    there in Table1).
    Thanks in advance,
    Pal

    Thanks for your solution. It is working, but my problem is
    Table1
    COL1     COL2     COL3     COL4
    1     col2     col3     col4
    2     col2     col3     col4
    3     col2     col3     col4
    4     col2     col3     col4
    Table2
    COL1     COL2     COL3     COL4
    5     col2     col3     col4 -- New row
    6     col2     col3     col4 -- New row
    1     col2     col3     col44 -- Different column value
    2     col2     col3     col4
    3     col2     col33     col4 -- Different column value
    4     col2     col3     col4
    select * from test2
    minus
    select * from test1
    COL1     COL2     COL3     COL4
    1     col2     col3     col44 --- needs to be update
    3     col2     col33     col4 --- needs to be update
    5     col2     col3     col4 --- needs to be insert
    6     col2     col3     col4 --- needs to be insert
    Actually, I need to update and insert those records through LIVE UPDATE in the remote database. In this case, Table1 data is in the remote database. The output of MINUS statement needs to be implimented in Table1, which is in remote database.
    Any suggestion will be appreciated. Thanks,
    Pal

  • Difference Between Current Day and fist day of the payroll period

    Hi,
    How do i find the difference between the current day and the first day of the payroll period with period parameter XX.
    Operation VARSTFDYXX is used to decide if the current day is the first day of the payroll period. But is there any operation available to check the difference in exact number of days.
    I know hrs=y is used to find difference between current day and a date specification record from IT0041, but i need to check difference between current day and first day from a payroll period parameter.
    Any response is greatly appreciated.
    Thanks,
    Imaneul Rajiv

    No! haven't seen it at all! Do I have to drain the battery completely and then charge it? I did that the first day I bought the phone and yet the stats are the same for me
    PS: I am referring to the Call Time stats and not the Usage/Standby stats

  • How can find the difference  between iphone 5 Real Genuine adapter and fake adapter

    Can anyone please tell me, How Can Find Difference between iphone 5 Real Genuine adapter and fake adapter....

    That's about the only way. Many of the fakes are indistinguishable from genuine without taking them apart. See: https://www.youtube.com/watch?v=wi-b9k-0KfE Note that BOTH of the adapters in this video are fake. Yet the one on the left looks identical to the "real thing".

Maybe you are looking for

  • Standard Search Functionality In Internal Catalog Not working fine

    In the Find Window , type in the description of an item to search for product in Internal catalog. Ideally it should be retrieving the asked product , but it is showing "No product found". Tried it even with Advance Search \Linguistic & Fuzzy search

  • Moving layers while maintaining correct proportions

    I make patterns using Photoshop CS2 and Elements 7. I want to be able to make files ( which are usually 1 inch) then drag many of them to a 8 X 10 inches blank page to print. This is to conserve special paper.  I have a problem with layers changing s

  • ITunes won't start without internet

    Hi is this a bug or a feature ? I cannot start iTunes while I am not connected to the internet. I get the beachball and iTunes is not responding. As soon as I activate the internet connection iTunes starts up immediately. Is this the way it is suppos

  • Does the camera roll need to be backed up?

    does the camera roll need to be backed up?

  • Complaints Routing how to do it.

    We need to route complaints for our projects. If anybody has done that would be glad if they can share their experiences. To be specific this is what my understanding of this is so far. When I go to the Rule Modeler->Order Routing-> by default I see