Use Date() for calculation

Dear sir,
I want to know how to use Date() for calculation.
For example:
int rentday = 7;
today = new Date();
I want to add today and rentday to get dueday. I've try to use "dueday=today + rentday", but error.
Pls help!!! Thanks!!!

Hi "acos3ltd",
I think, perhaps, that the "java.util.GregorianCalendar" class may be what you require:
http://java.sun.com/j2se/1.4.1/docs/api/java/util/GregorianCalendar.html
and this Web page may also be of help:
http://java.sun.com/people/linden/faq_b2.html#Date
Hope it helps.
Good Luck,
Avi.

Similar Messages

  • How to calculate and save planning data in bex input-ready query using keyfigures for calculation from different infoproviders

    Hi Dear All,
    We have two real time infocubes and two aggregation levels based on these cubes in one multiprovider
    first cube1 is like
    char1| char2| keyfig_coefficient(single value for each combination of char1 and char2)
    same aggregation level1
    (we have input query to fill coefficients by one responsible user)
    second cube2 is like
    char1| char2| keyfig_quantity| keyfig_result
    same aggregation level2
    Input ready query should be like (for all other users of different org units)
    char1|char2|keyfig_coeff| keyfig_quant(for input) | keyfig_result = keyfig_coeff*keyfig_quant(calculated value, should be saved to cube2)
    And we don't have pregenerated lines in cube2, users have to add new lines themselves by wad.
    Question is, what is the optimal (easiest) way to make calculation and save result data to cube2 where keyfigures for calculation should be used from different infoproviders. I need just a hint.
    Appreciate any help.
    Nadya.

    I found decision, agregation levels sould be based on multiprovider, not included.

  • Last Use Date for iViews/Pages/Workset - Portal clean up of old items

    Is there any scripts that SAP has created that shows the Portal Admin which iViews have been recently used by the users and which ones have not. We would like to go through our environments and Clean Up/Remove old none used code in the PCD.
    I am hoping there is a script that can be run which produces a report stating Last Used/Executed date. If there is nothing like this, does any one know if there is any Data Base table or fields that can identify this type if data so we can create/write our own script?  The PDC inspector may do this but its a very manual effort and we'd like something that is automated and runs in the background.
    I know we can turn on metrics, but that will not work for us because it completely bogs down our systems and we can't afford that. Hence we are looking for something that runs in the background and will not effect our environments.
    Thanks
    Pete

    Thanks everybody for trying to asnwer the first question.
    But I guess what I am really looking to find out, for every item we have in the PCD, is there a way to find the last used date? We don't want to turn on the metrics for a period of time like some of the solutions have suggested since that will bog down out production system and it still won't help us identify in our DEV and Test regions items that might still be valid but haven't been touched for a while or are still in development phases. 
    I was hoping that there would be a way that SAP would allow us to enter in a folder name, iview, workset, page, role, etc and then have the system tell us the last used/accessed date for that item or all of the items in the PCD folders.   Kind of the reverse thought to get this data instead of letting the metrics tell us which users have hit which pages, etc.
    Does any one know of that type of option? 
    Thanks
    Pete

  • Pick latter or two dates for calculation

    Hello all,
    I am new to discoverer and just came accross a request to do a calculation on a report that would show the difference between two dates. The first date is always the same field but the second is the latter date from two different fields. Is there a way to do that in discoverer? Without writing a custom function on the db server.
    Thanks

    Hi,
    Use (default_date-(GREATEST(folder.date1,folder.date2)) in the calculation.
    It should work.
    Thanks.

  • What is USING/TOTAL for calculating FACTOR

    Hi all,
    While calculating the factor we use USING/TOTAL what is that actually mean.Is that division of the value in USING and the value in TOTAL.
    If I am using some numeric values for the factor the values are  getting multiplied by that  factor value.
    But if i use this USING/TOTAL nothing is happening....
    Please reply me,
    Thanks in Advance...
    Regards,
    G.Vijaya Kumar

    Hello Vijaya-
    From your description it appears that you are attempting to utilize the Allocation function in BPC, and that your USING and/or TOTAL factors are zero (it appears that the unallocated records are being found since you can apply a manual factor against them).
    Please check that your USING and TOTAL definitions for each Dimension are correctly defined.   
    There is good guide on the set up of allocations that be found at:
    [How-to Manage Allocations in BPC 7.0|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e09eb0c0-87b1-2b10-06be-f1061a206091&overridelayout=true]
    Regards,
    Sheldon

  • How to use byte[] for calculation

    i use a random number generater to produce a random byte[] array . I need to use the byte[] generated to do some calculation. how i can do that?? do i need to change the byte[] array to integer first??

    You didn't say how many bytes make up your byte array. 1. Assuming the size of the array is 8 bytes or less, you could write your own code to convert the array to an int or long. 2. You can use the BigInteger class. 3. You can write your own code to do the calculations.

  • PS CS4 using GPU for calculations

    I see that Nvidia has a video card that can crunch photoshop calculations instead of the CPU (the Quadro CX, $1999). Is this the only GPU that can render photoshop calculations? Video cards even from 2 years ago are quite advance.

    <[email protected]> wrote in message <br />news:[email protected]..<br />>I see that Nvidia has a video card that can crunch photoshop calculations <br />>instead of the CPU (the Quadro CX, $1999). Is this the only GPU that can <br />>render photoshop calculations? Video cards even from 2 years ago are quite <br />>advance.<br />><br /><br />What do you mean by "calculations". Photoshop CS4 works perfectly fine with <br />my two ATI Radeon 1650 Pro cards. All of the GPU stuff CS4 offers is <br />supported and works perfectly.<br /><br />Robert

  • Is there any facility to store session data temporarily and use it for Calc

    Hi
    I would like to know is there any facility to store session data temporarily and that can use it for calculation int BI Beans.
    ANy idea or thoguhts would be appreciable .
    Thanks n Advance
    Anwar

    One way to do is to create a temporary variables in the AW and store values in these variables. Not sure if it fits on what you are doing. You can always store data on the BIBeans Applications layer. Not sure what your use-case is.
    Swapan.

  • Baseline date for payment due date.

    Hi,
    In FB60 and Miro, Baseline date for calculating due date for payment is taken as default as document date, as per setting in payment terms. But I want to take this date as date of GR/SE. Can we do this. I also want to make it gray and dont want user to change it. Please suggest how to do it.

    Hi
    go through the link answered by me.
    Re: Substitution - Baseline Date to be replaced by the Goods Receipt date
    the Goods receipt date can be defaulted as Baseline Date.
    tell your ABAP consultant to check the BADI and do the necessary.
    regards
    venkat

  • Can't seem to draw a chart (line chart) using dates rather than numbers

    I'm trying to draw a Line Chart but rather using numbers i want to use dates for example: Switzerland 23/06/2008 - 23/08/2008. Can't seem to get it to work? it seems to all go wrong when I change the cell format to 'date'
    Can anyone help?
    Thanks
    PS. I can do it easily in Excel

    Hello
    From my point of view, it's not surprising.
    In XL, a date is a number to which a date format is applied. So, it may be charted.
    Same thing with the good old AppleWorks.
    With Numbers, a date is NOT a number, it IS a specific class of data.
    The consequence is that it can't be charted directly.
    Happily, we may easily convert a date into a number.
    In column B the formula is
    =A-$A$1
    which calculates the numeric difference between stored dates and the date stored in A1.
    So, we may chart the results.
    I know that it's far from perfect but we have to live with the choices made by Numbers's designers.
    Yvan KOENIG (from FRANCE vendredi 18 avril 2008 18:44:14)

  • Iphone 4s stolen. Selected remote wipe via Icloud. Received email hours later saying it was happening. Here's the problem: according to Verizon, the phone is still using data. How is this possible? Wouldn't the user have to register the device with Apple?

    So, if a remote wipe occurred as the email stated, how did the person with the phone immediately go back to using the data on the phone.  Wouldn't the person have to register the Iphone through Itunes?  I got the email saying the erase was happening at 11:10.  Looking at my cellular data usage, the phone began using data about that time after about a 12 hour break. So it seems like Find my Iphone quickly picked up the phone.  But then the phone continued using data for about 3 more hours.  How could the person be using the phone if it had just been wiped?

    I understand that iCloud's erase function is totally distinct from Verizon's cellular service (i.e. the phone could be wiped and Verizon would never know).  It's been a while since I've activated an Iphone through Itunes, but when you activate the phone don't you have to register it?  If the iPhone was wiped at 11:10, how could it be using data at 11:15 and consistently for the next three hours.  How long does the Itunes registration process take?

  • When i open an app. like Facebook. does that use data?

    does opening an app use  data. for instanxe Facebook or instagram

    Yes they both will to refresh the news feeds and posts. Nowadays 90% of apps use data. In my experience The only apps that MAY  not use data are games.

  • How to  use data function using characterstics variable for calculation on

    how to  use data function using characterstics variable for calculation on  attribute as key figure

    Hi Gayatri
    Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
    In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
    This essentially means, IF A = B THEN C ELSE D
    The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
    IF PART_NUMBER < 'SDK00' THEN pay_amount
    ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
    ELSE pay_amount + 100
    This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
    DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
    In English this can be read as follows:
    IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
    Best wishes
    Michael

  • Problem while refreshing the data for the second time using excel services in sharepoint 2013...

    Hi,
    I have migrated my Sharepoint from 2010 to 2013.I am able to get the data at the first time of refresh when I click on refresh for the second time I am getting the empty the sheet.
    below find the flow of refresh
    First Refresh
    On Click of refresh open the workbook with excel services and return the session id.
    Using that session I am invoking RefrehAsync method of excel services
    After refresh completed I am setting the calculation of workbook as automatic(to calculate the formulas) using the same session id
    After setting the calculation as Automatic I am setting the calculation type as full(recalculate) using the same session id.
    Now I am able to see the data
    Second Refresh
    After clicking on refresh instead of opening the workbook I am using the session id(already opened workbook) and setting the calculation type as manual
    I am following the same process from refresh(RefreshAsync) as I have followed in first refresh.
    This time my formulas are not getting calculated because of that I am not able to see the data.
    Could you please let me know that am I missing anything here?
    Is this know issue in Sharepoint2013 excel services as same code is working fine with Sharepoint2010.
    If I close the workbook(session id null) and opens(new session id) for all the refreshes it is working and I am able to see the data.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

    I am able to see the data for the second refresh  if I change the data source.If I use the same data source which is used in the first refresh I am not getting the data.Excel services will contact the cubes and calculate the formulas in my workbook.
    Could you please let me know what could be the problem at second refresh while contacting the same data source with same session id?
    Please help me asap.
    Thanks,
    Meenakshi Nagpal
    N.Meenakshi

  • Attributes to be used for calculation

    Hi Experts,
    I have a requirement for master data attribute calculation i.e. Vendor payment term's attributes like no of days. This needs to be used in a query for some calculation purpose. I wanted to know if the attributes of a master data can be used in the coulmns for calculation?
    Thanks.
    Points would be assigned

    Hi Shridevi,
    Thanks a lot this was very helpful and i am able to use the formula for calculation.
    I just wanted a simple information. I have three key fig f1 f2 & f3 and i want a formula to check
    if f1 is empty then
    formula = f3-f2
    else
    formula = f3-f1.
    Just wanted to know if this could be done in a formula or will i have to write some kind of exit?
    Thanks.

Maybe you are looking for

  • Auto project triggering when multiple FG line item's in sales order

    Dear Friends, I am working on engineering project scenario mainly all are the Customer projects. Basically my client executes Customer projects for Establishing Dairy Plant, Pharma Plant, and Chemical Plant. For that they manufacture various FG assem

  • How do I remove the music from my phone?

    I have ran out of room on my Iphone and I want to take the music I put on it but dont know how. Can someone pleae help me?

  • How can I delete Documents from the KD?

    The documentation regarding deleting documents is poor! Can someone show me how to do this programmatically? I've been trying something like the following Web Service below: <WebMethod(Description:="This function will retrieve delete specified docume

  • Need spacing between columns

    I am having a time trying to get my three column to allow the background color and text to show between the columns.  You can see what I am speaking of with this link:  http://digitalresponseoc.com/clients/casey/index3.html When I float col 3 to the

  • Problem in Adobe Interactive forms

    Hi ,             I have created interface and context for my form using Form Builder. When i am designing Layout and when i click on SAVE, It was giving an error that 'Error while transforming object data'. ADS and java stack are installed in the sys