How  can I get number of days between 2 dates ?

How can I get number of days between 2 dates ?
Give me answer as soon as possible.....

Mukesh_Prajapat wrote:
How can I get number of days between 2 dates ?
Give me answer as soon as possible.....Is google broken again?
[How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]

Similar Messages

  • How can i get number of days between two dates represented by two dates?

    how can i get number of days between two dates represented by two date objects. One is java.sql.Date, the other is java.util.Date?

    tej_222 wrote:
    But how do I do that conversion. from java.sql.date and java.util.date to calender?
    -thanks for the quick response.You may find the following utility code samples useful:
    [http://balusc.blogspot.com/2007/09/calendarutil.html]
    [http://balusc.blogspot.com/2007/09/dateutil.html]
    ganeshmb wrote:
    (date1.getTime() - date2.getTime())/(1000*60*60*24) should do.
    getTime returns millsecond value of date object and the difference divided by no of milliseconds in a day should fetch you the difference in terms of days.This doesn't respect the DST. Use java.util.Calendar.

  • How do i get number of days between 2 dates?

    How do i get number of days between 2 dates?
    and the result must be in int.
    for example
    Ex. startdate: 2006-06-01 enddate: 2006-06-30 and the result is: 30
    how to do so? thx

    mel
    Iv'e used this method. It assumes startdate,enddate and days have been defined before but you could pass them as args.
    void days()
        try
          Date d1 = DateFormat.getDateInstance().parse(startdate);
          Date d2 = DateFormat.getDateInstance().parse(enddate);
          long days = (d2.getTime()-d1.getTime())/1000/60/60/24;
          days = ""+days;
        catch (ParseException e)
          System.out.println("Invalid date format");
      }It actually gets the duration in ms and divides down to days.
    Regards
    Chris

  • How can I get missing contacts, notes, calendar dates and reminders that are just on my old iphone onto the iCloud for transfer to my new iPhone upgrade?

    Dear wise & wondeful people:
    How can I get missing contacts, notes, calendar dates and reminders that are just on my old iphone onto the iCloud for transfer to my new iPhone upgrade? Half of my contacts, notes, ect. were on my iCloud so have happily moved to my new iPhone but the rest are completely resistant. For example, on my iCloud I have 14 missing contacts starting with the letter A alone, however they are happily viewable on my old iPhone 4S and won't budge over into the iCloud.
    There are also 3 notes missing yet still acessible on my onld iPhone 4S, the list goes on.
    Your help would be most appreciated. Thank you so much.
    BCHR

    Hi BCHR,
    If you are having issues transfering your content from your old iPhone onto iCloud so it can be transfered to your new iPhone, you may find the following articles helpful:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
    http://support.apple.com/kb/HT2109
    iCloud: Troubleshooting iCloud Contacts
    http://support.apple.com/kb/TS3998
    iCloud: Troubleshooting iCloud Calendar
    http://support.apple.com/kb/TS3999
    iCloud: Notes overview
    http://support.apple.com/kb/PH12081
    Regards,
    - Brenden

  • HOW CAN I GET THE PURCHASE ORDER RELEASE DATE

    Dear All,
    HOW CAN I GET THE PURCHASE ORDER RELEASE DATE - any reprot is there?
    Thank you
    Ahmad

    Hi,
    u goto that PO and select Environment on top line .under that select header changes if u click on that u will get entire details who reased when released, date , time etc
    regards,
    Srinivas Kona

  • How can i get the timestamp of first data at continue sample mode?

    how can i get the timestamp of first data at  continue sample mode?
    6023e pci , and c++ code
    thanks !

    The tangent ist the derivative of the curve in that point. You can try to use a numerical derivative vi or keep it simple an approximate with a line through the adjacent points.
    Gabi
    7.1 -- 2013
    CLA

  • I have a mac book running leopard software, 10.5.8 how can I get my computor up to date as loin requires minimum 10.6.6

    I have a mac book running leopard software, 10.5.8 how can I get my computor up to date as lion requires minimum 10.6.6.

    You can upgrade from 10.5 to 10.6 with no problems. Any program that runs under 10.5 should run under10.6. See this list for compatibility with 10.6: http://snowleopard.wikidot.com/  You might have to upgrade some drivers for printers, etc.... And you will have to install Rosetta if you have any Power PC applications http://www.macobserver.com/tmo/article/snow_leopard_installing_rosetta/  
    To upgrade your iLife and iWork. If you only want iPhoto or other single apps from iLife '11 you can get them from the App Store after you've upgraded to 10.6.6. iPhoto, iMovie or Garage Band for $15 each and Pages, Keynote or Numbers from iWork '09 for $20 each.
    You can order a Snow Leopard 10.6 install disk for $29 as long as you have at least 1gb of RAM and 5gb of free space on your hard drive. http://store.apple.com/us/product/MC573Z/A?mco=MTY3ODQ5OTY
    Once you are at 10.6.8 you can buy Lion for $29 from the App Store if you have at least a model 2,1 MacBook. Lion will require at least 2gb of RAM but really needs 4gb to run smoothly. As for programs see this list for compatibility with 10.7 http://roaringapps.com/apps:table Also Lion doesn't run any Power PC programs. To see if you have any Power PC programs go to the Apple in the upper left corner and select About This Mac, then click on More Info. When System Profiler comes up select Applications under Software. Then look under Kind to see if any of your applications are listed as Power PC. Universal and Intel will run under Lion.
    Before Mac switched to Intel processors they used Power PC processors from 1994 to 2005. Power PC 601 through 604, G3, G4 and G5. Applications written for the Power PC processors need the application called Rosetta to run on Intel processors. This was part of the Operating System in 10.4 and 10.5 but was an optional install in 10.6. With 10.7 Lion Apple dropped all support for Power PC applications.

  • Getting number of days between 2 dates

    Hello All,
    I require the number of days between 2 dates.
    The number of days is between low date : PR Date (not an input variable) and the high date.
    I have created an customer exit variable to get sy-datum in made it as formula variable.
    I have also created a formula variable for PR Date , and subtracted the 2 dates.
    It is not giving the correct result.
    Any suggestions.
    Thanks & Regards,
    VL

    Read through this web link.  It will show you how to calculate the days between 2 dates directly in your BEX query.
    No exit needed to calculate this.
    http://teklink.co.uk/sap/sap-bi-bw-how-to-use-replacement-path-variables-to-perform-date-calculations-in-the-bex-analyzer/

  • Please help how can I get Number of activations changed?

    How can I get my iPads reset for number of activations? I have had an original iPad and two iPad 3 and now 3 iPad Air due to defective tablets.They were replaced for technical issues. I keep getting this message on both devices in BAM2 E_AUTH_BAD_DEVICE_KEY_OR_PKCS12
    I have not even read the book I originally purchased from BAM. Please help.

    They'll know more in the Adobe Digital Editions Forum

  • My iTunes music folder is almost 1.5x the size on disc as my iTunes library. How can I get rid of this extra data?

    When I look at the iTunes music folder in Windows Explorer, it shows as 28.0 GB. In the iTunes library, it says my music is 18.3 GB. I would like to get my 10 gigs back.
    I've tried to add the media folder to my library - it just duplicated maybe 10 songs, didn't add any new ones. This suggests that there isn't any extra music in the folder. So why is it 10 GB larger? How can I get rid of the extra non-music data?

    Apparently there are some mp3 files that aren't adding despite importing the folder...
    That is actually a very common problem, due to iTunes being strict/finicky/incompetent (pick your own interpretation) about slight variations in MP3 formats. The problem can usually be corrected by treating the files with a 3rd party tag cleanup program, such as MP3 Validator.
    i don't know how much of the missing 9.7 GB this will apply to, but definitely worth a try.

  • How can I get rid of the extra data page on a pdf?

    Whatever happened to the old pdf creater?  It was so easy to use!  Now I get this extra page of data and the other pages are reversed.  How can I get back to what works?

    Oops!  I use Primo PDF and Nitro, and they both produce the same extra
    page!  I'll ask them, thanks.
    RB

  • How can I get my emails sorted in date order?

    how can I get my email page to read in date order

    Thank you for this. Now the emails are in reverse order but at least they are in date order. Can you help me get today message at the top?

  • How can i get my emails listed by date

    How can i get my emails listed by date

    Thank you for this. Now the emails are in reverse order but at least they are in date order. Can you help me get today message at the top?

  • Confused - How to Calculate Number of Days Between Dates but Exclude Weekend Dates If There Hasn't Been a Weekend Update

    Hello -
    I've been tearing my hair out over this problem i'm trying to solve, probably just been staring at it too long which is making it worse -
    I have a series of open support tickets which are supposed to be updated on a daily basis, the problem is that they aren't always being updated daily.  So, the business wants to know the number of days from when a ticket was last updated and today's
    date.  I have this basic calculation and it's working fine, however now the business wants to exclude weekends from the calculation.  The other problem is that some reps DO go in on weekends and update their tickets, so sometimes there will be updates
    made on weekend dates.
    To give an example -
    Today's date is 2014-02-10 (Monday).  A ticket was last updated last Thursday, 2014-01-30.  The difference between the two dates is 11, so it's been 11 days since the ticket was last updated.  Now, if I exclude Saturdays and Sundays, then
    it's actually been 7 days since the ticket was last updated.  I'm not sure how to do this in T-SQL.
    Now, to further complicate the problem, sometimes a ticket IS updated on a Saturday or Sunday.  So, if a ticket was updated on 2014-02-02 (Sunday), then it should be counted.  Again i'm not sure how to do this. 
    What gets me is that this is probably fairly simple and i've just been staring at it too long.  In the meantime, can someone offer some guidance?
    Thanks!!

    I've adapted this from a function on my blog. you will need to add set the YourTicketTable to where ever your tickets are stored.
    CREATE
    FUNCTION [dbo].[CalcWorkDaysBetween](@StartDate
    As DateTime,@EndDate
    AS DateTime)
    RETURNS
    INT AS
    BEGIN
    SET @EndDate
    =DATEADD(DAY,1,@EndDate)
    DECLARE @Count
    AS Int= 0
    DECLARE @Date
    As Date=@StartDate
    WHILE @Date
    < @EndDate
    BEGIN
    IF (DATEPART(WEEKDAY,@Date)IN(1,7)
    OR (SELECT
    Count(*)
    FROM YourTicketTable WHERE TicketDate=@Date)=1)
    BEGIN
    SELECT @Count = @Count
    + 1
    END
    SELECT @Date=DATEADD(Day,
    1,@Date)
    END
    RETURN
    DATEDIFF(DAY,@StartDate,@EndDate)- @Count
    END
    Regards,

  • How can i get my Dashboard sync between two macs?

    I have mabbok pro and imac how can i make this possible??????

    POP accounts can be set up to leave mail on the server. Thus this mail could be accessed from several different computers.
    I used Eudora a while ago, and set up 2 accounts, one left email on the server, and one did not. I would normally check mail from the one that left it on the server (accounts like this on several macs). When I was ready to download the mail, then I would check it from the other account that existed on only one of the macs.
    So in Mail, you could set up for POP and leave mail on the server. Then when ready to download (and not be able to see mail from various macs) you could switch to another user account, where Mail would be set up to not leave mail on the server.
    However, iMap makes this whole process easier.
    Normally, iMap mail can stay on the server forever. But I do like to get my mail and store it on my Mac after an arbitrary period of time. So I have set up a smart rule in Mail.
    It is GET MAIL:
    if Date received is less than 10 days old
    perform the following actions: stop evaluating rules
    So every day the mail is received, and of course it is less than 10 days old, so the rules stop evaluating.
    When I am ready to download the messages I select all in the mailbox, and use command-option-L to apply the rules. Any messages less than 10 days old stay on the server, Older messages then follow the other rules which are listted after GET MAIL. Usually these just filter mail into specific dumb mailboxes on my Mac. And/Or they could color the mail, or whatever else I choose to do with the mail.

Maybe you are looking for

  • Facing a Runtime Error u201C GETWA_NOT_ASSIGNED u201C in report at background

    Hi All, I am facing a Runtime Error u201C GETWA_NOT_ASSIGNED u201C when a custom report is executed in the background, whereas the same report in getting executed properly in foreground. The reason, which, the Dump Analysis specifies is u201C Field s

  • Timeline disappears

    I have created a timeline with show/hide behaviors that is functioning correctly when I save a file. When I reopen the file, the asterisk appears next to the title as if the file has been updated, but this occurs as soon as I open the file. I have no

  • I think I need help with driver (software) settings for D110a

    I think I need help with driver (software) settings for D110a all-in-one Product: D110a all-in-one OS: Windows XP Professional Error messages: None Changes before problem appeared: None--new installation The quality of photo images (mostly JPG files)

  • Photoshop CC non apre nuovi livelli video, e dice "il video non è supportato per questa versione di mac os"... possibile?

    Photoshop CC non mi apre nuovi livelli video (la voce "livelli video" non mi appare proprio sul menù "livello"), e dice "il video non è supportato per questa versione di mac os"... possibile? Che posso fare? Qualcuno sa aiutarmi? Grazie!

  • Bootable Device Trouble?

    Hi Guys Recently I tried to install Windows 7 onto my Intel based iMac. I aborted the procedure after first not being able to get past a black screen after the second installation reboot and second, after correcting this problem by searching the inte