How can get difference between 2 dates in the form of days

how can get difference between 2 dates in the form of days

Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS   LIKE VTBBEWE-ATAGE,
      EMONTHS LIKE VTBBEWE-ATAGE,
      EYEARS  LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
            TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
  exporting
    i_date_from          = FROMDATE
    i_date_to            = TODATE
  I_FLG_SEPARATE       = ' '
  IMPORTING
    E_DAYS               = EDAYS
    E_MONTHS             = EMONTHS
    E_YEARS              = EYEARS.
WRITE:/ 'Difference in Days   ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years  ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar

Similar Messages

  • I loos my APPLE ID, I have a new one, how can get access to data stored in the old one?

    I loos my APPLE ID, Now I have a new one, how can get access to data stored in the old one?

    Do you have the email & password of the old Apple ID?

  • How can I save my data and the date,the time into the same file when I run this VI at different times?

    I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
    2/12/03 16:04 13567
    2/13/03 10:15 35678
    So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.

    evolution wrote in message news:<[email protected]>...
    > How can I save my data and the date,the time into the same file when
    > I run this VI at different times?
    >
    > I use a translation stage for the experiment.For each user in the lab
    > the stage position (to start an experiment) is different.I defined one
    > end of the stage as zero. I want to save the position , date and time
    > of the stage with respect to zero.I want all these in one file, nd
    > everytime I run it it should save to the same file, like this:
    > 2/12/03 16:04 13567
    > 2/13/03 10:15 35678
    >
    > So I will track the position from day to day.If naybody helps, I
    > appreciate it.Thanks.
    Hi,
    I know the function "write to spreadsheet file.vi"
    can append the data
    to file. You can use the "concatenate strings" to display the date,
    time as well as data... Hope this help.
    Regards,
    celery

  • I unfortunately just got my IPhone 4s stolen.I thought I had the find my iPhone enabled but I didn't because I cannot locate the phone when I sign in ICloud.How can I erase all data on the phone so the thief can't access my personal information.

    I unfortunately just got my IPhone 4s stolen.I thought I had the find my iPhone enabled but I didn't because I cannot locate the phone when I sign in ICloud.I have a password on the phone but i'm not sure if I turned on the option where the phone resets if you incorrectly put the password more than ten time. I immediately called my phone company (Verizon) and reported the phone stolen.So I know whoever took the phone cannot place calls or use the phone. But can they still access my data on the phone if they manage to unlock the phone?  If so how can I erase all data on the phone so the thief can't access my personal information? is there any other way other than Find my IPhone to wipe off the data on the phone? I really don't want my personal information such as pictures, text messages, notes and social networks profile available to a stranger!!? Help please!!!

        Hello thewrongway,
    I'm sorry to hear about your phone!  I understand the need for an active device. You are able to activate an old device and process an insurance claim for your iPhone 4s within 60days from the incident date.  Keep in mind if the old phone is not a smartphone and you currently have unlimited data that feature will fall off.  If you have a tier data plan no changes will be made.  Please let me know if you have any additional questions.  Thank you.   
    TominqueBo
    VZW Support
    Follow us on Twitter at @VZWSupport

  • How can delete my iphone5 data from the date its restored?

    how can delete my iphone5 data from the date its restored?

    it's unclear what you mean
    if you wish to remove your iphone5 data you connect it to iTunes on the computer and click the restore button and choose restore to factory defect

  • How can we publish Labview data using the web

    how can we publish Labview data using the web?
    Dr. Eugene Berman, Moran Kamilyan and Ravit Bar

    [email protected] wrote:
    how can we publish Labview data using the web?
    You could use shared variables and publish them to the network or use data sockets.
    Kudos always welcome for helpful posts

  • How can I format a field in the form creator?

    How can I format a field in the form creator? It's putting the same text in all the fields within a table. I want each field within the table to have different text. As soon as you click out of the table, all the text is the same.
    I even changed the fields from a text box to a drop-down list so a person can make their selection, which will be a quantity from 0-9. There are two of these such fields. You make your selection in each, click off the table and both fields show whatever I selected in field 1. The original Qty I selected in the bottom field was a 5 but it changed it to whatever is in the top field on it's own. I've added a screen shot.

    This behaviors usually happens when you create the fields but  a copy paste command from one of the fields. The copy paste command assumes that your intentions is to maintain a copy of the field in two separate locations (e.i, a form field  "company name" printed in each and every page of a multi-page form document.
    Go to the properties fields of each field and make sure  to assign unique form field  names.

  • How can I close a category in the form central form without closing it as error?

    How can I close a category in the form central form without closing it as error?

    I'm still not sure I follow - let me see if this is right.  You want to have users signing up for something using a FormsCentral form and then when something is full you'd like that section to show as "Closed" or full so nobody else can sign up for that particular event/day/time?  If that is the goal FormsCentral does not have any logic to close certain portions of the form.
    Thanks,
    Josh

  • Iphone4s water damage, phone is on but no network or wi fi. How can I download my data from the phone

    iphone4s has water damage but the has power but no network or blue tooth or wi fi is NOT working, how can get my data from the water damaged phone.

    Looks like the Wifi and network antenna has been damaged by the water. It is a hardware problem and can only be fixed by the professionals.

  • How can I restore my datas from the trash ( itunes music)?Thanks

    How ca I restore my datas from the trash( i-tunes) I still can read the lists, but they are not backed. Thks

    Try DataRescue from ProSoft.

  • How can I differentiate between calendars on the notification center

    I have my calendar, and my wife's calendar on my phone so we can be sure to not double book ourselves.  In the notification center, I can see appts for both calendars, which is great, but how can I differentiate between calendars?  There is no indication that one appointment is mine versus another being hers.  Thoughts?

    You can do this face-to-face, or in writing.

  • Very important question need immediate answer please very serious, is there any way possible i can get recent text messages from the last 2 days and print them off after they have been deleted from my phone?

    is there anyway i can retrieve recent text messages from the last 2 days and have them printed off after they have been deleted from my phone?  this is seriously important i need this for an attourney!

    click here:
    Re: Can I request to get the content of old text messages

  • How to calculate difference between date in hours?

    Hi All.
    I need calculate difference between first and last date. I'm using the code below:
    int differenceDate = CalendarRule.elapsedDays(fromDate : myFirstDate, toDate : myLastDate);
    This code return an result in days. But I need that result was in hours.
    Has anybody help me?

    Interval dif;
    dif = myLastDate - myfirstDate;
    display((dif.hours));
    Hope it helps

  • How to get last login date of the user

    Hi,
    I have an application where i need the last login date of the user and if the differance between the last login date and the system date is greater than a certain range the user account should be locked automatically.Please suggest me how resolve the problem as early as possible.
    Thanks and Regards
    Aniruddha

    Hi,
    We have faced the same issue earlier. Some attributes are available in SAP API, but they are depricated by sap due to some performance issue.
    Below solution will be helpful:
    So we have implmented custom code in our application. We have developed one webdynpro application which will retrieve update & retrieve logon time from portal database(custom table). And we have integrated this application in desktop inner page. So this application will be invisible to the user and will executed first time when user logs into the portal.
    Regards,
    Charan

  • How can I use MY data in the GLV_GigaLabVIEWMemoryStoreAndBrowse.vi?

    Hello everyone,
    As I use large data files (500MB) and need to be able to view them in graphs, I was reading this arcticle about Managing Large Data Sets, and found the GLV_GigaLabVIEWMemoryStoreAndBrowse.vi example in the "Fast Data Display with Decimation" section of it. It is exactly what I need, but, of course, with my data... So, how could I rearrange this file to be able to see not it's own data, but the data I acquired with the TDMS Writer (1D array of waveform data)?
    Thanks,
    Rafael

    There are several options, but I would recommend using the already existing file as your data buffer.  This will replace the internal data structures (queue or functional global) for the main data, not the decimated preview.  I would do it as follows:
    Replace the number of points front panel control with a path control called Filename.  This will allow you to specify your file.
    Modify the command enum so Change NPoints is Change Filename (only needed for us humans).
    In the Value Change event (top loop) for Filename (create one if it is not already there, delete the nPoints one if it is still there), stuff the command queue with Change Filename.
    Create a local shift register in the bottom task handler loop (similar to the one in the traditional memory store and browse) to hold your file reference.
    In the Change Filename frame of the task handler, close the file reference (if it is valid) and open a new file reference using the TDMS functions (use the file name terminal to read the file name).
    Replace all instances of reading or generating the main data with the corresponding TDMS function using the new file reference.  For example, in the Change Filename case, replace the Sine Wave.vi with a TDMS Read.vi which reads the corresponding subset.  Make your chunk size 65,000 points for best speed.
    I have never done this with TDMS (only because I stopped working with file I/O before TDMS was invented), but have done it with raw binary, NI-HWS, and HDF5.  All worked well, so you should have no problems.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

Maybe you are looking for

  • Need help with gunshot effect in FCP

    New to FCP and am trying to add a gunshot effect to a short film. Doesn't have to look top notch...just looking for something simple. I added a muzzle blast for the shooter from detonationfilms.com, which worked great. When i overlayed the muzzle bla

  • I cannot see my template and sent folders anymore... please instruct

    hi for the last couple of days I cannot see some folders (i.e. Templates, Drafts, Sent) Sometimes the system suddenly begins showing them and they disappear... any ideas? thanks Gabriel

  • Working around unchecked conversions when using reflection

    I think I've convinced myself that there's no way around this issue when using reflection and Generics, but here's the issue: Suppose I've got a method that uses reflection to compare an arbitrary property in an arbitrary pair of beans (of the same c

  • E-recruitment  Urgent

    Can any 1 tell how can an internal r external applicant  enter the data  which transactional code he need to use to enter his/her data..

  • How to play .swf files stored in database?

    Ok, i am pretty stuck with this... Here is the problem: I have upload form which upload file to the server folder and in the database insert path. That works fine. What is my problem? When i go to dreamweaver and make insert SWF and i give the path t