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?

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;

  • FM which gives the date if we add 'x' number of days to the current date.

    Hi all,
    can you plz tell me the FM which will give me the exact date if i add some ' X ' number of days to the present date.
    in detail -->my inputs would be    1)DATE
                                                    2)no of days
    i need--> the exact date which comes after those days get added to the given date.
    PLZ HELP ASAP.
    Rgds,
    REDDY.

    Hi,
    You can use FM RP_CALC_DATE_IN_INTERVAL.
    data: wa_date  like sy-datum.
    *Add 21 days to current date.
    call function 'RP_CALC_DATE_IN_INTERVAL'
             exporting
                  date      = sy-datum
                  days      = 21
                  months    = 0
                  signum    = '+'
                  years     = 0
             importing
                  calc_date = wa_date.
    write: / wa_date.
    Regards,
    Ferry Lianto

  • I need help highlighting an expiration date on my Numbers '09 spreadsheet. I want the text/fill of a cell to change color when the expiration date of an item is within 180 days of the current date.

    I need help highlighting cells on my Numbers '09 spreadsheet.  I want the cell text/fill to change color when the date is 180 days or less from the current date.  I already have a cell with the current date in it.  I also know how to change the fill/text colors.  All the cells have been formatted to show date only.  I am having trouble with the formula.  I can get to the Conditional Formatting menu and select "With Dates" but after that I am lost.  Can anyone help?
    Thank you for any assistance.
    B

    Set a Conditional Format rule as shown in the illustration below. The rule has been applied to all dates in column B of the table.
    Regards,
    Barry

  • Regarding subtraction of 10 days from the current date

    Need to know how I can get 10 days subtracted from the current date before the report is excuted. This needs to appear in the selection screen before the report is excuted.
    The select option contains two fields the first field is the date which is 10 days subtracted from the current date and the next field is the current date.
    Please suggest.
    Thanks.

    Hi Dolly
    I had a same req before check that code:
    AT SELECTION-SCREEN OUTPUT.
    IF pa_older = 'X'.
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
    EXPORTING
    date = pa_end  "<<<<< date or in ur case sy-datum
    days = '10'
    months = '00'
    signum = '-'
    years = '00'
    IMPORTING
    calc_date = pa_end1.  " <<< subtracted date
    ENDIF.

  • To extend SAP user date and to add months to the current date

    Hi All,
    I need to extent the user date in SAP based on one condition.
    If the condition is true extend the date by 12 monthd if false 6 months from the current date.
    Can i have the FM for user date extentions and FM for getting the date.
    Thanks,
    Chandu.

    Hi ,
    You can use this FM for exteding the date.
    CALL FUNCTION 'BAPI_USER_CHANGE'
        EXPORTING
          username   = us_username
          logondata  = e_bapilogond
          logondatax = e_bapilogondx
        TABLES
          return     = i_return.
    u need to pass date and correspoing flag also.
    For extension of the date by months u can use this FM.
          CALL FUNCTION 'MONTH_PLUS_DETERMINE'
            EXPORTING
              months  = 6 or 12 ( depending up on ur logic)
              olddate = sy-datum
            IMPORTING
              newdate = us_expdate.
    Thanks and regards.
    Sham

  • How Do I Link To The Current Date/Month In iCal?

    I have a link on my website which points to a published iCal calendar. The link remains static, for instance, I created the link in January, and it pointed to the January view of the calendar.
    Now that its February, I'd like the link to point to the February month view (and so on throughout the year), but it remains linked to January.
    How do I make the link dynamic so that it points to the current month/date? Thanks in advance.
    G5 Dual 2.0   Mac OS X (10.4.4)  

    JFKrohn, Welcome to the discussion area!
    To get the current month, use a link like this:
    http://ical.mac.com/WebObjects/iCal.woa/wa/default?u=UserName&v=1&n=CalendarName.ics
    Where
    UserName = .Mac user name
    CalendarName = name of published calendar

  • Adding days to the current date

    I'm trying to write a program that takes an order and prints an invoice for my intro to java class. The date of the order and the date of arrival (which is 14 days after the date of the order) are to appear on this invoice. I thought that I figured it out but I get a compile error. Here's what I have so far:
    SimpleDateFormat formatDate = new SimpleDateFormat("MMMMM, dd, yyyy");
        Calendar rightNow = Calendar.getInstance();
        public String dateOfOrder()
             return formatDate.format(rightNow);
        public String dateOfArrival()
             return formatDate.format(rightNow.add(DAY_OF_MONTH, 14));
        }I'm writing it in JCreator and I get "cannot find symbol variable DAY_OF_MONTH" as my compile error. It compiled just fine until I added the dateOfArrival method. I keep reading through the Calendar API but I just can't understand why it won't work. What am I doing wrong?

    masijade. wrote:
    Which class is "DAY_OF_MONTH" a part of (I know what it is, but I want you to think on it). Try adding that class name to the front of the field name, with a period between them i.e.Calendar?
    I tried making the following adjustment but just got a new error.
    public String dateOfArrival()
             return formatDate.format(rightNow.add(Calendar.DAY_OF_MONTH, 14));
        }My error this time is: 'void' type not allowed here
    It seems like it is recognizing DAY_OF_MONTH now but something else is going wrong. Where am I going wrong?

  • 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.

  • ICal on my Macbook has always grayed the current date. iCal on my MacMini (both 10.5.8) never has until a few days ago but has since stopped. How can I get it to "shade" again?

    iCal on my Macbook has always grayed the current date. iCal on my MacMini (both 10.5.8) never has until a few days ago but has since stopped. How can I get it to "shade" again?

    At this point I think you should get Applejack...
    http://www.macupdate.com/info.php/id/15667/applejack
    After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
    applejack AUTO
    Then let it do all 6 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 6 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Trash old Log files.
    First reboot will be slower, sometimes 2 or 3 restarts will be required for full benefit... my guess is files relying upon other files relying upon other files! :-)
    Disconnect the USB cable from any Uninterruptible Power Supply so the system doesn't shut down in the middle of the process.

  • How do I add a current date to a form field so that it will give me the current date each time it is opened?

    I have adobe 9 pro. I am currently adding fields to a document and would like my date field to display the current date when the document is opened so that the user does not have to enter the date each time. How do I do that?

    Have you searched for this issue. It has been answered many times.
    Example Acrobat JavaScripts
    Scroll down to the . Insert Today's Date into Form Field section.

  • How can I make iCal in Lion open to the current date?

    I just updated from Snow Leopard to Lion and have had all of the frustrations with changes to iCal that are well-documented here and elsewhere.  One issue I haven't seen addressed, however, is a new behavior after quitting and re-starting.
    Previously, no matter what month/day/week I was viewing when I quit iCal, it would open the next time to the current (month/day/week).  Now, it opens to whatever date(s) I was last viewing when I quit.
    This is highly annoying - 99% of the time, if I quit iCal while looking at (some date 6 months into the future), that is NOT the date I'm looking for when I re-launch.  It's much more consistent behavior to always re-open to the current date, in whatever view (month/day/week) I previously used.  So if today I launch iCal and I'm thinking about adding an event a month in the future, I open iCal, change to month view if needed, and go forward one month.  This is the way iCal always worked previously.  Instead, the version in Lion might leave me on any random month, depending on what I was doing when I closed the program the last time, and so I have to figure out "what month/week am I looking at?" before I know how to navigate.  Very irritating.  (As is the move of the forward/back buttons away from the month/day/week buttons, necessitating that I move the cursor to two different areas of the screen in order to navigate.  Whose idea was THAT?)
    I haven't found a preference to resolve this bizarre behavior change.  Can anyone help?

    Hi,
    I don't know of a preference, but have you used ⌘-T in iCal?
    Best wishes
    John M

  • How to get the current date and compare dates

    hi
    does anyone know how you would get the current date?
    furthermore, how to compare the current date with a past date to see how many days or months have past since then?
    thanks

    have a look at the Date class. new Date() creates an object containing the exact date and time at creation time. (Date).getTime() might be useful for comparing two dates. GregorianCalendar might be useful, too.

  • In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)

    In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)
    == This happened ==
    Every time Firefox opened
    == I upgraded to Firefox 4 (beta)

    Firefox 3.6.* and earlier set the downloaded file's modification time to the current time. In Firefox 4.0 the behavior has been changed, if a server returns a timestamp telling when the file was last modified (Last-Modified header), it is used instead.
    You can revert to the previous behaviour by using the [https://addons.mozilla.org/en-US/firefox/addon/93121/ Download Timestamp] add-on.

Maybe you are looking for