How to set date +120 daye to one date field

Hi,
I have 2 fields one is Close date(Item style is Message Layout) and Quote Valid Until(Item Style is Date Field).After opening the page Close date will come automatically. Now My requirement is need to put Close date+120 days to Quote Valid unti field. Pls let me how to do this one and pls provide Sample code....
Thanks in advance,
Hanimi....

Hanimi,
Use Below Code
//Convert the fetched date to calendar date and use the below method.
import java.util.Calendar;
public class CalendarAddExample {
    public static void main(String[] args) {
        Calendar cal = Calendar.getInstance();
        System.out.println("Today : " + cal.getTime());
        // Subtract 30 days from the calendar
        cal.add(Calendar.DATE, -30);
        System.out.println("30 days ago: " + cal.getTime());
}Regards,
Gyan

Similar Messages

  • Filtered the data to get only one data per day

    Hi,
    From the excel file below I have Power (from Hg Lamp) vs date.
    I would like to filtered the data to have only one data per day. So when there are many data for one day, I want the data with Max Power (and delete the others).
    In the test vi below I filtered data by compared the data 1 by 1. So I reduced the number of data but I still have date with many data.
    I would like to count the number of data per days and keep the data with max power, but I don't know how to do it.
    If you have any ideas...
    Thanks
    Geof
    Attachments:
    Test.xls ‏227 KB
    Test.vi ‏48 KB

    I did it
    Thanks
    Attachments:
    Test.vi ‏48 KB

  • How to set the POV in WebAnalysis when data source is HFM?

    Hi Every one..
    Could any one tell how to set pov in web analysis when data base is HFM. And hoe to make the report Dynamicall (Current Pov Member like in FR). for this if use Essbase Ican get it it easiliy by using Subtitutional variable but is ti possible fo rHFM.
    Thnaks in advance
    Rao

    yeas agree with sanakar,
    this field which shankar is talking about must be entry date (if u delta timestamp is date, u will also have to mention this table field name in definition of delta), this means that this field will catch last change to the record, so that it will be delta enabled based on the latest change date. This is very important becuase if u use date like posting date to the delta then back dated posting will not captured in to the delta, as delta for this back date is already been done.
    Hope u understand this.

  • How to set background of jtable in no data?

    How to set background of jtable in no data?
    I use table.setBackground(Color.black) but no successful
    Please help me. thanks very much

    maybe, you don't understand me.
    I have below jtable:
    ============================
    I column1 name l column2 name I
    ============================
    l data l data l
    ============================
    l data l data l
    ============================
    XXX
    ============================
    I wrote:
    table.setBackground(Color.black) then only data area has black colour, but XXX area hasn't black colour.
    How to XXX area also has black colour?
    help me, thanks very much.

  • How can I add [# of days] to a date?

    edit::  Nevermind, I found the answer.  I'm using AS 2.0
    Answer: new Date(year, month, date+#)  where # is the # of days to add.
    Helpful link: http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/  (AS 2.0 & 3.0)
    Original question:
    The title is horrible, couldn't think of how to word it.
    Anyway, I want to know how I can take a date, add a few days to it, then display the resulting date.
    For example, today's date is 8/20/2010.  I want to be able to add 10 days to this and then display the result in a label or other output.
    The label would then read 8/30/2010.  If I wanted to add 15 days to today's date, the label would read 9/4/2010.
    Any help is appreciated, thanks!

    Another way of adding values to a date object is to set up constants, and this will make life easier if you do Date math frequently, or are adding to a date which is unknown until runtime (i.e., not neccessarily today's date).
                private var todayDate:Date = new Date();
                //One day, in milliseconds:
                private const oneDay:Number = 1000 * 60 * 60 * 24;
                private function addDaysToTheDate():void {
                    //The number of days you wish to add:
                    var daysToAdd:Number = oneDay * 10;
                    //Add the days to today's date:
                    var answer:Date = new Date(todayDate.time + daysToAdd);
                    Alert.show(answer.toDateString());

  • How to set up shared use of "Contacts" data w/ 2 individual user accounts?

    How to set up shared use of application "Contacts" data for two individual user accounts?

    Link the contacts in one user account to a online cloud based system like Google or apples iCloud and then link the second user to that same online account. This could cause some slight problems if both people maintain their own online account to either of those systems on a phone or pad.

  • How to calculate number of days between two date in Template design?

    Hello guys
    I have a situation where I have to create a template that returns data, and one of the thing of the existing report is that there is a column that is actually the number of days between start date and end date columns..
    So in template, how would I be able to do the same? I have start date and end date columns on the template, now when I created another column using expression like end date - start date and preview the template, I am getting errors saying :
    Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert 03/31/2009 to number.
         at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1534)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:521)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
    Please advice
    Thanks

    Hi
    There is an extension function you can use, from the javadoc:
    date_diff
    public static long date_diff(java.lang.String format,
    java.lang.String fromDate,
    java.lang.String toDate,
    java.lang.String locStr,
    java.lang.String tzID)
    Method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only Gregorian calendar.
    Parameters:
    format - the format to which the difference is required; allowed formats are y (for Year), m(for month), w(for week), d(for day), h(for hour), mi(for minute), s(for seconds) and ms(for milliseconds)
    fromDate - the first date
    toDate - the second date
    locStr - locale string -> lang-Territory
    tzID - timezone ID ->http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimeZone.html
    Returns:
    the difference in dates in the desired format
    For example
    <?xdoxslt:date_diff(‘d’,’2009-09-14’, ‘2009-09-20’,’en-US’,1)?>
    give a result of 6
    You can substitute in columns for the dates, just remember the date format required.
    Regards
    Tim

  • How to calculate number of days from a date field

    Dear BW Experts.
    I have a field 'Create Date' in the BEx query. Now we need to create a variable which should give the number of days from the date of running the query (sy-datum) to the Create Date.
    This will help the users to get records which are say, 30 days old (Sy-datum - create date = 30) or 10 days old etc.
    Could you suggest as to how to create this variable.
    Thanks,
    Sai

    Hi,
    Step 1: Create variable on "Create Date" with User entry processing type
    Step 2: Create a restricted KF for Sales & restrict it on "Create Date" to get "Sales on day"
    Step 3: Manipulate  the values of "Create Date" on which you could restrict  "Sales" again and again to get other values
    Step 4: Create one variable (ZPUTMNTH) for u201CMonth to Dateu201D with processing by u201CCustomer Exitu201D. This variable was created  on u201CDateu201D characteristics.
    Step 5 : Goto C-mod t-code and use EXIT_SAPLRRS0_001
    to calculate "month to date" user input is "Calday" Key Date
    WHEN 'ZPUTMNTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(6). "low value, e.g.YYYYMM (200606) part of key date (20060625)
    L_S_RANGE-LOW+6(2) = '01'. u201C low value e..g. YYYYMM01 (20060601)
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    Assign if helps.....
    Regards,
    Suman

  • NEED info on How to Set Router to access just one website???

    Ok here we go again, Finally found out it's my Linksys not letting me onto one website..I had a 310N and thought that was the problem so went out and bought a 610N ..same darn thing just won't let me access one website I need to sell my goods for income. I remove linksys from my modem and plug it directly into one of my computers and I got the website..Yes it's a Linksys problem !!!
    I need some info on how to set up a access point in my router's setting to let me log on to this website www.denofangels or http://74.86.166.210/
    Is it time for me to call the support team??????????????
    I'm running XP on my computers, have 3 of the 4 computers using wirelessN adapters and on the main computer is the WRT 610
    Help Please ....linksysDoll
    Gone Nutz trying to figure out Linksys again!!

    MY Internet provider is Time Warner / Roadrunner cable..Does this help you to solve my problem. Nothing wrong with the modem..just my wrt 610N settings, I'm guessing it carried over from my wrt 310N..this was working fine until a couple of months ago and then nothing for this one website.
    I'm running XP
    Thank you in advance for any help or info
    Gone Nutz trying to figure out Linksys again!!

  • How to set up multiple libraries on one computer

    How do you set up multiple libraries on one computer for itunes?

    Launch iTunes with the Shift key(Windows) or Option key(Mac OS X) held down.
    (90004)

  • How to calculate number of days between fixed date and hire date in schema

    i want to calculate the number of days between a fixed date en the hire date (infotype 041)
    If i read the documentation  right, i should use the following command:
    HRS=YDXA02
    Variable 3 (the x) is the fixed data.
    My question is how do i program the variable x?
    Let's say the date 01.01.2008
    Any help would be welcome

    I assume we are talking about PCR for payroll. In this case look at documentation for operation NUM:
    OOOOOO
    Xnnnnn
    X     Table
    nnnnn Table field
    nn    Date type 'nn' from the Date Specifications infotype (0041)
         Date types are taken from table T548Y.
    Your operation would look like:
      NUM=Faaesb
          F          Fixed indicator for deadline calculation
           aa           Date type: Start date of period to be
                        calculated; if the date type is not 'nn,'
                        the second position is left blank.
             e          Unit, in which the duration is calculated:
                        T = days
                        W = week
    s         End date of period to be calculated:
              (blank)  End of current payroll period
              J        End of current calendar year
              A        Start of current calendar year
              B        Start of WPBP period
             No other specifications are possible.
    So it depends on what kind of fixed date you need.
    Hope it helps,
    Carlos.

  • Is retaining hotsynch an option with the pre plus // how to handle syncing 2 devices to one data source

    I just bought two Palm Pre plus' from Verizon.  I have no need for gmail - is it possible to continue using hotsync with the new device (I have the original Treo 600)?
    If not, are people comfortable with their data being "out there" on Google's servers?
    Finally, if you have two devices for your family can you sync both devices to one data source?

    Robaerie wrote:
    I just bought two Palm Pre plus' from Verizon.  I have no need for gmail - is it possible to continue using hotsync with the new device (I have the original Treo 600)?
    Assuming you mean you wish to continue using Palm Desktop or M$ Outlook to sync your data to your new Pre phones, you should review this stickied thread near the top of this board.  It discusses several third-party solutions for continuing to use desktop synchronization instead of using a Google account.  Note, these solutions sync directly to the Pre's contacts and calendar databases, rather than synchronizing with the Classic application, which as mentioned above is also an option.
    However, the two Chapura products (Echo for Palm Desktop and Pocketmirror for Outlook) only have the capability of synchronizing one assigned user name per desktop.  In other words, at least the last time I looked, they don't allow you to sync multiple separate phones with the same desktop without going into the Windows registry and changing it.
    If not, are people comfortable with their data being "out there" on Google's servers?
    Can't speak for everyone, but I am comfortable with my stuff on Google.
    Finally, if you have two devices for your family can you sync both devices to one data source?
    You can easily do this with Google, by one of two ways I think: either setting up each family member's account separately, directly on your device, or by sharing the Google calendars in your own google.com account.
    Lastly...please don't cross-post the same (or essentially identical) question in more than one thread.  It clutters up the forums, dilutes your responses, and does not increase the visibility of your question.  Thanks.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • How to set the delta for existing generic data source

    Hi BW Guru's
    I have a problem,actually i have a exsting generic data source"ZFRBHRCHY". Master data Object ZFRBHRCHY  is getting laoded from all some R/3 Clusters on a Daily Basis. It is full load and takes 4 to 5 Hours, but number of added records(2000) are very less,while total records are more(40Lks).For avoiding this larger load time every day,i want to implement delta extraction for this.
    How to implement this,(i want steps for this) .
    Thanks in advance,
    Regards
    reddy

    yeas agree with sanakar,
    this field which shankar is talking about must be entry date (if u delta timestamp is date, u will also have to mention this table field name in definition of delta), this means that this field will catch last change to the record, so that it will be delta enabled based on the latest change date. This is very important becuase if u use date like posting date to the delta then back dated posting will not captured in to the delta, as delta for this back date is already been done.
    Hope u understand this.

  • How do I add 364 days to a date?

    HI,
    I'm trying to add 364 days to a date on a form I've created.
    I've tried this method using form calc on the EndDate field but no success, just errors.
    EndDate=Date(InvoiceDate.getFullYear(),InvoiceDate.getMonth(),InvoiceDate.getDate()+364)
    Can anyone help please?

    The "InvoiceDate" is a character string and not the number of days from the epoch date for the "InvoiceDate". You first have to convert the "InvoiceDate" character string value to the number of days since the epoch date by using the "Date2Num()" function. Once you have the "InvoiceDate" as the number of days since the epoch date you can add the additional days before using the "Num2Date()" function to convert the adjusted number of days back to a date string.

  • How to set defalut value to DB current date time in EO using sql

    HI,
    I am using below query to set default date time as DB current date
    select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') from dual
    but it is throwing exception
    (oracle.jbo.AttributeLoadException) JBO-27021: Failed to load custom data type value at index 7 with java object of type oracle.jbo.domain.Timestamp due to java.sql.SQLException.

    Halo,
    I tested it & was able to find the values inserted in db in hiredate column.. What is that you did? Was this..
    In EO of emp -- Hire date column of datatype timestamp :
    details tab.. Default value -- expression :
    DBTransaction.currentDbTimeIf you would have done this,
    On run time when we click createInsert button , by default you will see the date.. After committing the changes, query it in db and will find the inserted record with default value..
    Sample data i tested :
    SQL Statement which produced this data:
      select * from emp where empno=1111
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
    1111,null,null,null,06/05/2013 17:18:41,4500,null,nullRegards,
    Archana

Maybe you are looking for

  • Loading apps after iCloud restore is slooooooow!

    The loading of apps after restore is 12 hours+ and has far to go. How do I speed up the process?

  • How to configure backup parallel in SAP with oracle database?

    Dear SAP, We need your suggestion on oracle database backup parallel using brbackup, our SAP system run on: OS: UNIX - SUN Solaris SPARC 10 SAP: ECC 6.0 SR3 Database: Oracle 10.2.0.4 Our production database are growing rapidly, estimate growing is 2G

  • Login Options: Name and Password?

    I have login options set to display "Name and Password" but at login I am presented with a list of Users...  I see an icon for each user account.   Am I missing something? Regards John

  • Material document not generated

    Hi gurus I created a outbound delivary and PGI is also done. But it didn’t generated any materail document. Can any one help me?? Reward points. kishore

  • OK, Anyone else think the service should just work...

    I've been reading through the forums for some time now.  I have been a BT customer (this time around) for about 2 years.  Previously for many more years. Seems to me that BT customers have to put up with what our American cousins would find totally u