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

Similar Messages

  • How to find the day of a particular date

    Hi,
    I am working on an app which will display 15 days in retrospect with the date and day for any entered date. For example if the user enters June 15, 2001 the app has to display dates from June 1 and the corresponding day of those dates like sunday, monday... Is there any function which would help me.

    use the java.text.SimpleDateFormat and java.util.Calendar classes
    // look at the javadocs for SimpleDateFormat for mor info about the formatting
    // string that is passed to the constructor
    // the format below translates to : "Fri, Aug 17, 2001"
    SimpleDateFormat formatter = new SimpleDateFormat ( "EEE, MMM d, yyyy" );
    Calendar cal = Calendar.getInstance();
    Date theDate = new Date();
    cal.setTime( theDate );
    for ( int i=0; i<15; i++ ) {
        String dateStr = formatter.format( cal.getTime() );
        System.out.println( dateStr );
        cal.add( Calendar.DAY_OF_YEAR , -1 );
    }output of this code:
    Fri, Aug 17, 2001
    Thu, Aug 16, 2001
    Wed, Aug 15, 2001
    Tue, Aug 14, 2001
    Mon, Aug 13, 2001
    Sun, Aug 12, 2001
    Sat, Aug 11, 2001
    Fri, Aug 10, 2001
    Thu, Aug 9, 2001
    Wed, Aug 8, 2001
    Tue, Aug 7, 2001
    Mon, Aug 6, 2001
    Sun, Aug 5, 2001
    Sat, Aug 4, 2001
    Fri, Aug 3, 2001

  • How to know the day of a given date?

    Hello Experts,
    Is there any function module that can give the day of a given date? For example, If
    I put in 10/30/2007, it will give me Tuesday. Hope you can help me guys.Thank you and take care!

    Hi
    Yes, DATE_COMPUTE_DAY
    Sample code:
      clear: hold_day_of_week.
      CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
                DATE = workdate
           IMPORTING
                DAY  = day_of_week_num
           EXCEPTIONS
                OTHERS  = 8.
      CASE day_of_week_num.
        WHEN 1.
          hold_day_of_week = 'Monday'.
        WHEN 2.
          hold_day_of_week = 'Tuesday'.
        WHEN 3.
          hold_day_of_week = 'Wednesday'.
        WHEN 4.
          hold_day_of_week = 'Thursday'.
        WHEN 5.
          hold_day_of_week = 'Friday'.
        WHEN 6.
          hold_day_of_week = 'Saturday'.
        WHEN 7.
          hold_day_of_week = 'Sunday'.
        WHEN OTHERS.
          hold_day_of_week = 'invalid'.
      ENDCASE.
    or 
    You can use  DATE_COMPUTE_DAY to get the day number of the week (for example, today gives 5)
    then use WEEKDAY_GET which returns an itab with seven entries (one for each day of the week.)
    You enter in this itab and get the field langt to get the day name.
    code @ http://www.sap-img.com/abap/fm-to-get-the-day-for-a-particular-date.htm
    Pls reawrd points

  • Logic to build report to get the stock on a particular date

    Dear Guru's,
    We are trying to build a report for getting the stock on a particular date. It is not possible to copy MB5B that option is ruled out. We have also tried to get the data from MBEWH but that is also  not helping as the table is not updated for all the periods.
    Please advice
    Thanks,
    Sam

    Dear Sameer,
    You can copy MB5B report and can modify as per your reuirement.
    If you want get stock a paticular date.It is hard to get, why because you have to fetch all the Material documents
    and you have to use MBEW table to get the current date stock and you have to do add/subtract from calculated stock.
    Due to this there will performance issues also.
    So try to copy MB5B and change as per your requirement.
    regards
    Subhash

  • Find the 'DAY' for a given 'DATE'

    Hi Folks,
    I need a help regarding finding the day for a given date.
    My requirement is that..,
             If I enter a date using 'parameters', it should write the 'day' for the corresponding date.
    To be more specific.....,
    if I enter date as ' 07/15/2008 ' it should return me  the day as 'Tuesday'.
    Regards,
    Naveen G

    HI,
    FM LIST WITH RESPECT TO DAY, WEEK, AND MONTH.
    CALCULATE_DATE : Calculates the future date based on the input .
    DATE_TO_DAY : Returns the Day for the entered date.
    DATE_COMPUTE_DAY : Returns weekday for a date
    DATE_GET_WEEK : Returns week for a date
    RP_CALC_DATE_IN_INTERVAL : Add days / months to a date
    MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
    END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
    HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
    FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days.
    MONTH_NAMES_GET : Get the names of the month
    WEEK_GET_FIRST_DAY : Get the first day of the week
    HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
    SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
    HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
    LAST_DAY_OF_MONTHS : Returns the last day of the month
    DATE_CHECK_PLAUSIBILITY :Check for the invalid date.
    Reward points if useful,
    siri

  • 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 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 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);

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

  • Find Logged in Users on Previous day or any Particular date

    We would like to know if there is a way to find out <b>which users have logged in to portal on a particular day</b>. The Standard Activity report in User Administration <b>just mentions that of the current day.
    </b>
    Firstly, is there a configuration available to do so?
    Secondly, Is there an API available for this if there is no configuration.
    If these dont work, there exist some WCR tables which we can query..... I just want to know if any table stores the daily logged in details of a user in seperate records? Or does it update the same record...

    Hi Bharat,
    Security.log  is created on portal server for logging import security events such as successful and failed user logons, and creation or modification of users,groups and roles. Location in file system: <J2EE-installation>\j2ee\cluster\serverX\log\system\security.log
    Entries in the log file has the following format [TIME STAMP][SEVERITY][ACTOR][EVENT][OBJECT TYPE]=[OBJECTID][OBJECTNAME][DETAILS]   for Ex:  Oct 09,2007 3:47:25 PM | Info | <UserLogon> | LOGIN.OK | USER = ...| ......| TestUser01?
    TIMESTAMP values can be used to get the logged in user information during specified period
    Thanks,
    Madhu.

  • Display Null when the column has a particular date value

    Experts,
    I have write the below query in Date column,
    CASE WHEN Table.Column='Bad A'
    THEN CAST(Null as "Table"."Date")
    WHEN Table.Column='Bad b'
    THEN CAST(Null as "Table"."Date")
    ELSE "Table"."Date"END
    but I am getting *" Invalid Alias Format : Table_name.Column_name required"*
    Please let me know where I did mistake.
    Thanks in Advance.
    Thanks,
    Balaa...

    Is that Table withe data column that you are using to replace the values in the main column using the case statement is an alias table or physical table? If it is alias table, you might want to try to use physical table instead.
    Thanks,
    -Amith

  • Add the ability to manipulate image data early during the import process

    Following many discussions about the inability to cleanly support aspect ratio in LR, it would be useful to have the ability to interviene in the import process (early) and manipulate the exif data. It is possible to attach a metadata preset during import but presets do not give the ability to change the aspect ratio and cropping tags.
    This feature could have many other uses such as allowing more complex naming schemes, copy location, etc.

    Perhaps your post would be better received in the Lightroom forum? (this is the SDK forum).
    Or perhaps better still, the feedback forum: http://feedback.photoshop.com/photoshop_family/topics/import_actionshttp://feedback.photoshop.com/photoshop_family/topics/new
    SDK-wise: one can easily intervene via plugin and apply whatever transformations pre-import that one could think of...
    Rob

  • Cannot download mail from the server after a particular date

    Hi, I just set up my pop3 account on the Iphone. That was easy
    I started downloading the mails. It download all the mails till Wednesday morning and then just stopped. Since then I've tried to re-install the email account, download the mails again, reboot the handset but nothing seems to work. Each time it only downloads the mails till Wednesday morning and stops there.
    My Gmail account on the other hand works fine and is up to date with the email notifications.
    Any advise on how to go about this?
    -B

    Most POP3 clients delete messages from the server on download.  Are you positive you don't have another mail client set up somewhere (on your home or work computer) that may have already pulled them down and deleted them from the server?

  • 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());

Maybe you are looking for

  • Clicking on a link no longer opens a new tab with Firefox 17.0.1 update of today

    New tab on clicking link opened earlier today but not since Firefox updated itself to 17.0.1. When I click on a link, the page just jumps, but the new tab doesn't open. It will open if I right click the link, which I shouldn't have to do. How can I (

  • I can't restore my artwork

    I recently updated the software for my iPod, and the update did what it was supposed to. However, it erased about half of the artwork that I had for my music library, and I can't seem to restore it. It shows up in the song info, but it does not appea

  • Architecture

    Hi, I'm a newbie and would like som help with design, or to be pointed in the right direction. Im about to build the foolowing application: 1. My object is "user" 2. The "user" has a setting to when he wants an email (different settings for different

  • Having 2 condition type discounts show as active in the sales order.

    1 condition type discount has value 0% 2 condition type discount has value 31%. Both are showing green and being active. once I place a digit intead of the 0%   Ex: 29% then the 2nd condition then becomes inactive and works fine. What the user would

  • Add fields to script?

    Hi, I want to add one field in the output of the script please let me know the step by step procedure. regards, vijay