Amount of Days

Hello,
i have two characteristics (start-date & end-date) defined as date and i have to calculate a new characteristic, called "amount of days" by a routine. exists a function module which i can call within a routine to get the amount of days?
Start-Date      End-Date     Amount of Days
01.01.2005     31.12.2005  365
12.03.2002     26.04.2005  116

Hi
What is your issue..subtraction of date works fine in BW
Days = DAT1 - DAT2
Thanks
Tripple k

Similar Messages

  • Amount of days in a month

    Hi. How do I retrieve the amount of days in a month? Thanks.

    here is a long way....
    if the  month is January return 31
    if the  month is Feburay return 28 or was this year a leap year.......
    if the  month is March return 31
    ........ and so one..
    //but there is a better way just figure it out!!!!!David

  • Amount of days in each month

    Post Author: mike7510uk
    CA Forum: Formula
    i have a report where i have the days of the month along the top. I use this formula to get the day number
    ... int(day(DateAdd ("D",0,cdate({Command_1.startdate} )))) ...
    where the 0 is incremented along the report up to 30. The startdate bit of the formula is a pre-defined date such as 01-04-2007 (1st april)
    The fields then all work up to the point of 30th, i need it to end there and not go into the next month (1st)
    Obviously this is fine if the month has 31 days as it will just display 1-31. I need some IF statements maybe that looks at which month is selected and displays the correct amount of days.
    Any ideas?

    Post Author: SKodidine
    CA Forum: Formula
    The easiest way to get the last day of the month (and hence the number of days in a month) is to use the custom function that comes with CR.  I have only worked with CR XI so not sure about other versions.
    1. Open the formula workshop.
    2. From the Repository Custom Functions, under Crystal and then Date, RIGHT click on cdlastdayofmonth, click on ADD TO REPORT.
    3. Create a new formula, in the formula workshop, under FUNCTIONS, go down the list till you see "CUSTOM FUNCTIONS", expand that till you see cdlastdayofmonth.
    4.  In your formula, type cdlastdayofmonth(currentdate)
    5. Save and close and display the formula in your report, you should see 04/26/2007, depending on your date format.
    You can customize the formula to suit your needs, and this way you do not have to worry about leap years..

  • I received charges on my credit card that I did not make.  Amounts and days that I did not purchase anything from ITunes., I received charges on my credit card that I did not make.  Amounts and days that I did not purchase anything from ITunes.

    I have received charges on my credit card from ITunes for amounts that I have not made.  There are 6 different purches on 3 different days.  One day the two amounts were 20.95 and 20.96.  The previous day the amounts were both 109.99.  The day before that they were 139.99 and 99.99.  I have tried to contact ITunes, but no answer.  The statement on my credit card says APL*APPLE ITUNES STOR 866-712-7753 CA.  I did not make any of these purchases, did not receive an e-mail about what was even bought on these days.  Anyone else have this trouble and resolve it?  Looks like I will be going to the bank today to cancel my card!  Very disappointed in ITunes lack of security.

    I have had the same problem with a credit card that I have never used at Apple. The amount was $21.23 and was described "MC Authorization 00112507 APL*APPLEITUNES STORE 2010-04-07 12.31.59"  Apple's email help desk couldn't help me because the card isn't one of my stored cards.  I was told to contact my bank.
    It seems to me that somewhere in AppleLand there is a record of the charge which is still pending.  I don't want to go through the hassle of changing cards.

  • Sales order should be blocked based on amount and days

    Hello Gurus,
    We have a requirement -The sales order should be blocked based on credit amount and number of days  maintained for particular customer
    But where do we maintain validity period for that amount for a particular customer
    EX  : Credit limit  amount is: 10000
           Valid time period : 2 months
    This amount  should be valid for 2 monthsonly   now my doubt is where can we maintain validity period for that particular and customer , if he does't use it  , then amount get lapsed and new  amount will be maintained again
    Thanks and regards
    Venkat

    Hii Venkat,
    Credit check: Static check
    Indicates whether the system carries out a static credit check.
    Use u2013
    The customer's credit exposure may not exceed the established credit limit. The credit exposure is the total combined value of the following:
    Open sales documents, Open delivery documents, Open billing documents, Open items (accounts receivable).
    You can specify in the adjacent fields whether the system takes into account all open orders and all open deliveries.
    Note u2013
    The open order value is the value of the order items which have not yet been delivered.
    The open delivery value is the value of the delivery items which have yet been invoiced.
    The open invoice value is the value of the billing document items which have not yet been forwarded to accounting.
    The open items represent documents that have been forwarded to accounting but are not yet settled by the customer.
    Credit check: dynamic check
    Indicates that the system carries out a dynamic credit limit check within a specified credit horizon.
    Use u2013
    The customer's credit exposure is split into a static part - open items, open billing, and delivery values - and a dynamic part, the open order value. The open order value includes all not yet or only partially delivered orders. The value is calculated based on the shipping date and the credit horizon you specify in the adjacent field. For the purposes of evaluating credit, you want the system to ignore all open orders that are due for delivery after the horizon date. The sum of the static and dynamic parts of the check may not exceed the credit limit.
    Thanks and Regards,
    Santanu

  • We have a satellite connection that restricts our download amount per day. Since watching videos on YouTube and viewing Facebook photos online counts as downloads, is there any way I can see how much each web page is in terms of MB or KB size?

    Our satellite company's Fair Access Policy allows:  425 mb max per 24 hours, but it seems like we often go over that amount by just surfing the internet. We have 2 adults and 3 kids who use Mac computers. Is there a way to view the amount of KB's or MB's used after viewing a page? For instance: does looking at a Facebook page use 100 KBs? does looking at a YouTube video use 10 MBs?
    Thanks.

    There are a few things you can do to cut down on bandwidth. I set Firefox never to check the cache with pages online, so that if I go back to a previous page, it does not need to download again, but can be pulled out of the cache.
    browser.cache.check_doc_frequency - set to 2 (never)
    I use Flashblock to prevent Flash items from downloading automatically. If there is any Flash item you want to see, you click the icon over that space, and that one item will load but none of the others on the page will load until you want them to do so.
    I use Adblock Plus to block ads. This saves bandwidth as well, since it stops banner ads from being loaded, and blocks popup ads as well.

  • How do i change the amount of days before emails get deleted on the ipad

    When i receive emails, they delete after a day. Are there any settings that i can configure in order for the emails to stay longer?

    o nevermind, jorge was right, in the drivers window u can change this, i found it when : go to preferences, go to audio, look at the lil tabs under the bigger icons, right under the audio icon u see drivers, click it and u see the max number of tracks thingy, thanks alot dude

  • Disable AD user after first successful login (after password change) after x amount of days regardless of activity

    I've been searching for over a week high and low now trying to find a way to do this via PS.
    We'd like to lockout certain users (we can put them in a group/OU) 30 days after their first successful log in - the one requiring
    password change by them.
    And we'd like to disable it REGARDLESS of their activity.
    All the tips and scripts I've found look for 'inactivity', date created etc.
    Only parameters I need are 30 days AFTER the first log in. Accounts might be created 60 days before actual use, but still need to be disabled 30 days after their first successful log in.
    Any tips would be GREATLY appreciated!

    I don't think you're going to get the kind of solution you want via scripting. As jrv noted, usually this kind of issue is managed by using account expiration and password expiration. If that won't work for you, then I would recommend looking into supported
    third party tools that can help you get where you need to go.
    -- Bill Stewart [Bill_Stewart]
    As Bill points out you  need to look into third party tools.  If there is any legitimate legal or industry need for this then there wil be third party tools.  Having worked in medical software systems \I can tell you there is not. There are
    old systems that use now-obsolete mechanisms that do things similar to what you are asking.  They are no longer usable.
    I think if you sat down with those asking you to do this and had them get the actual industry and government rules on the table you would see that this is not what they are asking you to do.  It aslo doesn't make much sense from a technical standpoint.
    Just set the password expiration.  That is what it is designed for. To force reauth just set the account so the user cannot set the password.  Use the reauth web page to allow the user to set a new password.  Use the corporate disclaimer
    or a desktop link to notify users what to do when the password expires.
    ¯\_(ツ)_/¯

  • Create a table calculating amount of days in InfoPath form

    Hello,
    I am creating an InfoPath form and I want to have a table that will calculate the days needed to complete a project, it will allow the user to enter start dates and end dates and as that happens one row will have the calculated length of days it will take
    to complete based on use input and it would be real-time so no need to manually press a button to update.
    Here is my table for example:
    The first row will be the row that has the Total project time with the start time and end time based on user input.
    Is this something that can be done in InfoPath without any code? I am unable to use code so unfortunately that isn't an option.

    Hi compuluv,
    Based on your description, my understanding is that you want to Calculate the length between two date picker controls in InfoPath using rules and formulas - no code!
    Use rules, conditions, and the number(), floor(), and
    substring()   functions in formulas to calculate the difference between two date picker controls in InfoPath.
    Here is an article about it, you can use as a reference:
    http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-formulas.htm
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Lisa Chen
    TechNet Community Support

  • Days of Credit field ?

    Hi all,
    I have a reqmt in which, I have to report Weighted Average days of vendor payment.
    <b>Selection parameters:</b>
    Company code range
    Vendor range
    Payment date range
    Payment document type.
    <b>Report columns:</b>
    Vendor #
    Vendor name
    Terms of payment
    Days of Credit
    Invoice Amount
    Discount Taken
    Paid Amount
    Average Days to Pay
    Weighted Amount
    Weighted Days to Pay
    I have got all the fields except "<b>Days of Credit</b>".
    Programming logic:
    Based on selection parameter the program will read cleared line items of vendors.  These will be Payment documents (mostly from Check Payment run transaction F110 with Document type ZK, ZP, etc.)
    The hint given in the reqmt for this field is :
    Days of Credit – Invoice &
    Days of Credit – Configuration (T. Code – OBB8).
    But, I am unable to get this field. I have gone through RBKP, RBVS, REGUH, RSEG tables. Kindly suggest me a table where i'll get this field.
    Regards,
    Neha.

    Hello Mahesh,
    This function is used for checking documents that have already been released by a credit representative, but that have subsequently been changed. The system does NOT carry out another credit check if the following conditions are met:
    o   The value of the changed order is not greater than the value already approved for credit (inclusive of the deviation factor), AND
    o   The current date is not greater than the original release date plus the number of days specified here.
    Ur doc might have failed in one the condition specified above.
    I hope this helps( source : F1).
    Rgds,
    Raghu.

  • How to calculate the number of days until your next birthday. Only using current month, day and birth month and day.

    I'm trying to calculate the number of days until your next birthday. Only using current month, day and birth month and day. I can get close but i'm way off. When i enter in the next day, the amount of days is supposed to be 364. This is where I am having problems. I know my code is way off. I just need some guidance please!
    Attachments:
    D5.7_1.vi ‏8 KB

    I just had a little fun with the Time Record...
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    D5.7_1_BD.png ‏19 KB

  • Assign Month within a date range (by most days in a given month)

    I have a begin and end date, sample data as such
    select to_date('01-13-12','mm-dd-yy') from_dt,
    to_date('02-23-12','mm-dd-yy') to_dt
    from dual
    union all
    select to_date('03-15-2012','mm-dd-yy') from_dt,
    to_date('04-16-2012','mm-dd-yy') to_dt
    from dual
    union all
    select to_date('05-13-2012','mm-dd-yy') from_dt,
    to_date('07-23-2012','mm-dd-yy') to_dt
    from dual
    How do I assign a month by the most days in a month within that date range? Sometimes the date range might have the exact same amount of days in a month (like 3/15/2012 has 16 days and 4/16/2012 has 16 days). In this case, I want the earlier month (march).
    So from the sample data:
    01/13/2012, 02/23/2012, February
    03/15/2012, 04/16/2012, March
    05/13/2012, 07/23/2012, June
    Thanks
    Edited by: user4422426 on Mar 1, 2012 5:15 PM

    Hi,
    Here's one way:
    WITH     cntr          AS
         SELECT     LEVEL - 1     AS n
         FROM     (
                   SELECT      1 + MAX (to_dt - from_dt)     AS max_day_cnt
                   FROM     table_x
         CONNECT BY     LEVEL     <= max_day_cnt
    ,     got_r_num     AS
         SELECT     x.from_dt, x.to_dt
         ,     TRUNC (x.from_dt + c.n, 'MONTH')     AS month
         ,     count (*)                    AS cnt
         ,     ROW_NUMBER () OVER ( PARTITION BY  from_dt, to_dt
                             ORDER BY        COUNT (*)     DESC
                             ,             TRUNC (x.from_dt + c.n, 'MONTH')
                           )     AS r_num
         FROM       cntr     c
         JOIN       table_x  x  ON  c.n  <= x.to_dt - x.from_dt
         GROUP BY  x.from_dt, x.to_dt
         ,       TRUNC (x.from_dt + c.n, 'MONTH')
    SELECT     from_dt, to_dt
    ,     TO_CHAR (month, 'Mon YYYY')     AS mon
    ,     cnt
    FROM     got_r_num
    WHERE     r_num     = 1
    ;Thanks for posting code to create the same data. Please test your code before you post it: you got the order of arguments to TO_DATE reversed.

  • More days in week view

    Found a tip recently to change the dafault number of days within the week view of Calendar:
    Change to 14 days:
    Close Calendar
    Open Terminal
    enter following command within Terminal:
    defaults write com.apple.iCal CalUIDebugDefaultDaysInWeekView XX
    XX to be replaced by the amount of days you want to show!
    Resetting it to the default of 7 days:
    Same code within Terminal, XX replaced by 5 or 7......

    barns,
    Apple Discussions is just a user-to-user forum. You should not expect any response from an Apple employee.
    Also, check your settings in:
    System Preferences...>International>Formats>Dates>Customize.
    There will be a Show: field which has Short/Medium/Long/Full. I am not sure which one fills iCal. Change them one at a time and experiment with individual settings.
    As you can see the International Preference has additional time settings in:
    System Preferences...>International>Formats>Times>Customize.
    I am not using Leopard, so I am not certain about the exact configuration of that preference pane.
    ;~)

  • If I ordered in store pickup for 2 items can I pick them up on one day

    I ordered a MacBook Air 11in upgraded so it won't come till the 12 of this month so I got a $100 iTunes gift cards with it. When I go to ordering select in store pickup for both items not thinking if they had a limit on the amount if days they will hold an item.  So I finished my order and then I get a notification later saying that my item is ready for pickup...then I realize my MacBook Air isn't going to be ready till the 12 so can I wait for my MacBook Air and pick them up on the same day or do I have to pick them up on separate days... Thanks

    they generally hold items for 5 days.  But if you call the store and explain the situation they will probably hold them longer, within reason.

  • Day Wise Report

    i am doing day report. it should show the details of empname and amount every day. I am using the below query ..
    select a.Extra_Amount,a.Emp_Name,to_date(b.days,'DD-MM-YYYY')
    from (select api1.invoice_type_lookup_code
    ,     api1.invoice_num                prepay_invoice
    ,     nvl(api1.invoice_amount,0) Prepay_amount
    ,     api2.invoice_num                Applied_invoice
    ,     nvl((-1)*aid1.amount,0)           Applied_amount
    , nvl(api1.invoice_amount,0) - nvl((-1)*aid1.amount,0) Extra_Amount
    , ppf.title||' '||ppf.first_name ||' '||ppf.last_name Emp_Name
    , to_char(api1.invoice_date,'DD-MON-YYYY') invoice_dates
    , api2.invoice_date
    from ap_invoices_all                     api1
    ,     ap_invoice_distributions_all aid
    ,     ap_invoice_distributions_all aid1
    ,     ap_invoices_all                     api2
    , po_vendors pov
    , po_vendor_sites_all povs
    , per_all_people_f ppf
    , per_all_assignments_f paa
    where api1.invoice_type_lookup_code='PREPAYMENT'
    and     api1.invoice_id=aid.invoice_id
    and api1.vendor_id=pov.vendor_id
    and api1.invoice_date<=nvl(:P_TO_DATE,api1.invoice_date)
    and ppf.person_id=paa.person_id
    and     sysdate between ppf.effective_start_date and ppf.effective_end_date
    and     sysdate between paa.effective_start_date and paa.effective_end_date
    and pov.vendor_id=povs.vendor_id
    and COALESCE(api2.invoice_date-api1.invoice_date, 10)>5
    and     ppf.employee_number=povs.vendor_site_code
    and api1.vendor_site_id=povs.vendor_site_id
    and     aid.invoice_distribution_id=aid1.prepay_distribution_id(+)
    and     aid1.invoice_id=api2.invoice_id(+)
    and nvl(aid1.reversal_flag,'N')!= 'Y'
    and     api1.vendor_id=78009
    and api1.org_id=nvl(:P_ORG_ID,api1.org_id) )a
    , (select to_char(c.day,'DD-MON-YYYY') days
    from (select date '2007-03-31' + level day from dual connect by level <=1000) c) b
    where a.invoice_dates(+)=b.days
    group by to_date(b.days,'DD-MM-YYYY'),a.Extra_Amount,a.Emp_Name
    i am getting the result
    i am getting the amount for an employee on a perticular day.
    but i should display the amount every day from which i got the day to to_date
    and one more problem i have
    select date '2007-03-31' + level day from dual connect by level <=1000)
    i am passing the date as hard code but i have to pass that as parameter
    please help to solve.
    Thanks in Advance
    Venu

    SQL> select to_date('&date','dd-mon-yyyy') from dual
      2  /
    Enter value for date: 01-jan-07
    old   1: select to_date('&date','dd-mon-yyyy') from dual
    new   1: select to_date('01-jan-07','dd-mon-yyyy') from dual
    TO_DATE('
    01-JAN-07
    Or
    SQL> var d varchar2(20)
    SQL> exec :d:='01-jan-2007'
    PL/SQL procedure successfully completed.
    SQL> select to_date(:d,'dd-mon-yyyy') from dual;
    TO_DATE(:
    01-JAN-07Regards
    Singh

Maybe you are looking for