How add 14 days t o a date ?

Hi all,
I have a date in this format
2006-08-19 21:00:05
I want to add 14 days and get the new date .
then i want calculate difference between that new date and current date .
Thanks in advance

String nextDueDate=[date in your format];
dateFormat = new SimpleDateFormat("MMddyyyy");
java.util.Date dt=dateFormat.parse(nextDueDate);
long nextDueDateln=dt.getTime();
nextDueDateln=nextDueDateln+14*24*60*60*1000;
java.util.Date nextDueDatedt=new java.util.Date(nextDueDateln);
String nextDuedate=dateFormat.format(nextDueDatedt);

Similar Messages

  • How to Add 15 Days to the current Date in eCATT

    Hello eCATT Guru's,
    How to add 15 days to the current date in eCATT.
    I have changed the Date format to mm/dd/yyyy.
    now i want to add 15 days to the sy-datum.
    How to do that.do any one know?
    Thanks in Advance,
    Raj

    Check out this link -
    http://help.sap.com/saphelp_46c/helpdata/en/d7/e21a50408e11d1896b0000e8322d00/frameset.htm
    It gives details about DATE variables in CATT. Hope this will help you out.
    ashish
    Reward points if you find this helpful.
    Message was edited by: Ashish Gundawar

  • Add one day to the current date

    Hi all,
    A stupid question...
    How can I add one day to the current date in a select. I want something similar to add one month to current date, but with days:
    something like:
    select TO_CHAR (ADD_MONTHS (SYSDATE, -1), 'DD-MM-YYYY')
    from dual
    Thanks

    select sysdate+1 "add one day" from dual;

  • How to add get Day value in a Date object?

    Hi,
    I am writing a sql statement that has two date values. One I am getting it from the database. The format in the database is MM/DD/YYYY. My first question is how do I convert the format into the java date format, YYYY-MM-DD. The second question is I need to find out what the day is and add 1 to it. How do I get Day value in a Date object?
    Thanks.

    Look at "SimpleDateFormat" and "parse" in the archives.

  • How to add 15 days to the current date

    Hi everyone,
    I have the following doubt.
    I stored the current system date in to a variable.Now I want to store the date which is 15 days after the current date in to a new variable.
    ie current date:1-aug-09
    later date:1-aug-09 + 15 days ie 16-aug-09.
    Plz help me in solving this problem.
    Thanks & Regards,
    srinivas

    jaligamasrinivas wrote:
    I used String variable to store the current Date.
    Now in new string variable i want to store the date after 15 days from current dateSee reply #2. String is not the right type, to be doing date arithmetic, just like it wouldn't be the right type to do numeric arithmetic. You wouldn't store integer values as strings and ask how to add them up, would you?

  • How we add Grace days to net due date

    Hi,
    How we add grace days (eg one week) to net due date? This is only for particular customers.
    Regards,
    Shaik

    Hi Azeen
    Try this way. I assume that you want to know how much is due from customers as on a particular future date, that should come between today and that date. For preparing the liquidity forecast for the month, I use the following method for estimating the recoveries from the Customers and payments to Vendors and it works quite well for me.
    Let's say for Customers you want to forecast the collections that would come in the month of Jan from today until 31 Jan'09. Use the FBL5N Report, using the 'Open Item Key Date' as a future date, in our example - 31 Jan'09. Change the layout of the report by including the feilds 'Net Due Date' and 'Arrears after Net Due Date'. Sort the report on the Document Date, this being the baseline date. Now in the 'Arrears after Net Due Date' you will find the overdue days, which would be equal to the difference between the Date of the Report (31 Jan'09) and the Net Due Date of the Open Item. Thereafter, use the filter for 'Arrears after net due date' and click on the icon for 'multiple values'. Exclude the range of days, by assigning the lower and the upper limits. Lower Limit will be in minus, for those invoices that would still not be due upto 31 Jan'09 and the upper limit will be 7, since you would be granting a grace period of one week and consider all those invoices as not due upto 31 Jan. Once the filter is set, the report will exclude the open items as per the filter and provide you with a fairly accurate estimate of collections for the period/month.
    Let me know if it works for you.
    Regards

  • How can I add 1 day to requeste delivery date

    When a sales order or e-commerce order is created we want the requested delivery date to be 1 day later if the order is entered before a specific time. If it is entered after the specific time it should be 2 days later. Of course this date must be checked against transport zone assignment and factory calendar.
    In R/3 we could set the + 1 day in IMG for the sales transaction header, we probably can do it here to, but I do not understand how.
    I do appreciate any help.

    I have fixed the one day forward but not the expired time for two days. Does anyone know how I can manipulate it in a date rule??
    When the time has passed 2PM it should be 2 days in stead of 1 day.

  • Add one day to java.sql.date

    I ask user to enter a date: yyyy-mm-dd, then I want to add one day to that date, I don't know how to do it?
    java.sql.Date time2 = java.sql.Date.valueOf( args[0] );
    Many Thanks.

    since a date object is really nothing more than a long you can always add one day's worth of milliseconds to it....
    long milliInADay = 1000 * 60 * 60 * 24;
    Date d = ......
    d.setTime(d.getTime() + milliInADay);although there may be some issues with this i'm unaware of, but seems pretty straightforward to me.

  • How to use "Days to keep historical data" & "Maximum time between logs(hh:mm:ss)

    Iam using LabVIEW DSC. Values are being logged continously into citadel.
    Is it possible to retain data of just one month and delete the earlier data as fresh data is being logged into citadel?
    Is it possible to achieve this feature with "Days to keep historical data" & "Maximum time between logs(hh:mm:ss)" options in the history menu of Tag configuration editor ?

    Yes, Days to keep historical data does what you are looking for. After the specified number of days, the old data gets overwritten with new data. So, you always have only the specified number of days' of data in Citadel.
    Note: You may sometimes see that old data doesn't get overwritten till after a day or so of your setting (depending on how much data is being logged). This is because Citadel logs in "pages" and waits till the current page it's logging to is full before it starts overwriting the old ones.
    You do not have to use the 'Max time between logs' option for this. This option forces Citadel to log data every so-many hh:mm:ss regardless of whether or not the data has changed. Note that this is NOT a way to "log data on
    demand". Because, this periodic logging of data would change for a particular tag when its data changes. So, even with this setting all data may not get logged at one shot. Anyways, as I said, you do not have to use this setting for what you're trying to do.
    Regards,
    Khalid

  • Add the days to a particular date

    Hi all ,
    I got a date in my internal table .
    I got a integer which holds certain no. of days .
    I need to add that integer to the date .
    like i got 10.10.08
    integer is 5.
    i have to get 15.10.08
    pls let ,me know
    regards
    Raj

    Hi,
    Just add the integer to the date field..
    Ex..
    DATA: V_DATE TYPE SYDATUM.
    V_DATE = SY-DATUM + 5.
    Write: / 'Five days later the date will be, ', v_date.
    Thanks
    Naren

  • 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 add some days to the current system date

    can anyone help how to add some days to the current date i.e if today is 3-12-2007 and if v add 15 more days then the output should be 18-12-2007

    RajeshChandan wrote:
    First of all thanks a lot ,and coming to the question i dont mean to change the sysdate instead i want to write a prg. where after entering the current date it should effect with the no.of days that i have given but not the system date .if u can answer please reply for thisAh, I see. In that case, you can use an instance of GregorianCalendar and use it's add(...) method to add days, months, years etc. to it.
    http://java.sun.com/javase/6/docs/api/java/util/GregorianCalendar.html
    Good luck.

  • Add 45 or 90 days to an input date, depending on date

    I'm a newbie - I want to add 45 days to an input date if it is before 01/01/2012 and add 90 days to the input date if it is after 01/01/12. So far, i have the following:
    if (LEOPDate100B_RequestedBOE.rawValue ne null) then
    Num2Date(Date2Num(LEOPDate100B_RequestedBOE.formattedValue,"MMM D, YYYY")+ 90,"MMM D, YYYY")
    else
         null
    endif
    I'm not sure how to add the qualifier date. I've looked in all the forums i can find and can't find any help. Any assistance is greatly appreciated!

    Hi Paul,
    I modified code TextField1.rawValue = TextField1.rawValue + 365
    to TextField1.rawValue = TextField1.rawValue + 365 * 24 * 60 * 60
    I enter in EffectDate 08/30/2010 and get in ExpDate field wrong date like 4/19/8353. How to fix it? How to make ExpDate field empty if EffecDate is empty?
    Thanks.

  • How to get days between 2 dates  in jasperreports

    hi All
    i m not getting how to find days b/w 2 dates in jasper reports.....
    here is da detail info....
    i am generating jasper reports for transaction in bank
    i have to get the days b/w current transaction and last transaction dats way its needed
    plz any one help me to get days b/w current and previous transactions...
    i m waiting for ur respone....plz.
    with regards
    kotresh

    take a look at Calendar in the API docs.
    It should give you some ideas.
    If it doesn't, look harder as the answer is right there.

  • How to add 2 days to a date field?

    How to add 2 days to a date field if a Saturday was selected on a different date field?
    Thanks

    I am attempting to add a date field and then have a another field add an amount to a box if the date is less than 30 days. Later I want to update the form to have the today's date is less than 10 days.
    Early Registration Fee is $10.00 if posted by February 25, 2008
    Late Registration Fee is $20.00 if posted by March 17, 2008
    It seems simple, but, when you get to be 71 years old, it seems difficult. Any help will be appreciated.
    Here is a link to the form I'm working on:
    http://www.aworldwide.com/Gideon/Convention_Registration.pdf
    I am using a trial version of Adobe Acrobat 8.
    Thanks,
    Andy Anderson

Maybe you are looking for

  • Oracle Integration Adapter for SAP R/3

    I am working with a customer implementing Oracle EBS Release 12.2. The customer has implemented SAP for financial modules and the oracle solution considers an EBS - SAP Integration for Receivables. Does anyone have any experience integrating Oracle E

  • External mic won;t work

    imovie won't record voice over using my Plantonics USB mic. It worked on my last project several months ago I've checked prefs and its selected input and output... I'm stumped

  • ITunes 7 and iPOD Nanos Freezing

    We have had an iPOD mini for a couple of years with no problems. This week we bought 2 nanos as presents for family members. We had to download iTunes 7 to talk to the new nanos - since then it has been a disaster. iTunes can take 5 minutes to start

  • How to be sure g5 is dual processor

    How can I be sure my G5 is a dual processor 2.7 or 2.8ghz? That's how it was advertised when I bought it, but in about this mac this is what shows: powermac G5, 9.1 power pc G5 3.0 cpus 1 cpu speed 1.8ghz l2 cache per cpu 512mb memory 3gb bus speed 6

  • What is the range for the newest AirPort / Time Capsule?

    I am considering a house remodel which would put my computer in a room away from my router.  How far apart can they be and still work effectively?