How do get the years and days Between two dates

if you had 5/1/2006 and 2/28/2002 how would you get 4.17?
0
Doe (4)
9/12/2005 11:01:02 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
511 Views

Similar Articles

[PageSpeed] 48

If 5/1/2006 is in A1 and 2/28/2002 is in A2, then maybe:

=(a1-a2)/365
or
=(a1-a2)/365.25

But if you're trying to find differences between dates, you may want to take a
look at =datedif().

You can find lots of info at Chip Pearson's site:
http://www.cpearson.com/excel/datedif.htm

(=datedif() was only documented in xl2k's help.)

jhon doe wrote:
> 
> if you had 5/1/2006 and 2/28/2002 how would you get 4.17?

-- 

Dave Peterson
0
petersod (12004)
9/12/2005 11:57:38 PM
Reply:

Similar Artilces:

I cannot get my printer to print any information
I USED EXCEL 2003 TO GENERATE A WORKSHEET WITH DATA. I CANNOT PRINT IT. WHY? The why could be many things, some of which could be exel issues and some of which could be driver issues, network issues, or others. Can you, for instance, print from other applications to your printer? Have you been able to print from Excel in the past and this is a new problem, or is this your first attempt to print from Excel? -- Y "ANDIAMO" wrote: > I USED EXCEL 2003 TO GENERATE A WORKSHEET WITH DATA. I CANNOT PRINT IT. WHY? ...

5 days from now (revisited)
Ok, I was using the one formula that was provided here =if(day(a1)=1,a1+4,a1+6) and it seems to work sometimes. if the date is 11/1/04 it gives 11/5/04 Correct 11/1/04 it gives 11/5/04 Correct 11/1/04 it gives 11/5/04 Correct 11/1/04 it gives 11/5/04 Correct oops, hit send before I was done., let me finish what I was saying. Ok, I was using the one formula that was provided here =if(day(a1)=1,a1+4,a1+6) and it seems to work sometimes. if the date is 11/1/04 it gives 11/5/04 Correct 11/2/04 it gives 11/8/04 Correct 11/3/04 it gives 11/9/04 Correct 11/4/04 it give...

How to get user name which is active in windows
I am working a software which can set specific conf. for each user, so my program needs to know which user is active now, which API or MFC class can do it? -- Nothing impossible, Nothing sure GetUserName/GetUserNameEx --- Ajay I do it like this: // This function is useful for retrieving the current user name BOOL GetUser(CString &csUser) { TCHAR szUserName[80]; DWORD dwResult, cchBuff = 80; // Call the WNetGetUser function. dwResult = WNetGetUser(NULL, (LPTSTR) szUserName, &cchBuff); if(dwResult != NO_ERROR) return false; csUser = szUserName; ...

Todays DAY?
Hi this is one of those stupid questions!!! :) Is it possible to return todays DAY? I can get the current time and date just not the day? Any help would be great. Cheers Phade -- phade2blue ------------------------------------------------------------------------ phade2blue's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24852 View this thread: http://www.excelforum.com/showthread.php?threadid=384620 =TEXT(DAY(TODAY()),"dddd") Vaya con Dios, Chuck, CABGx3 "phade2blue" <phade2blue.1rpnev_1120590512.9036@excelforum-nospam.com> w...

no date/time on individual emails in inbox
Hi, Currently my inbox emails are showin up correctly in the "list" view with recipient, title and date and time. However when I click on each individual email they read "sent:none" instead of the date/time. This is just in my inbox, but is a problem when printingor fowarding a copy as they have no date/time on. Have tried uninstalling and re-installing outlook but with no success Any help would be greatly appreciated. Did outlook download the messages or did you import them? What type of email account? -- Diane Poremsky [MVP - Outlook] Outlook Tips:...

How can I change the chart so date is up and down and data is acro
I have a chart that has the date across the bottom (category axis) and the data up the side (value axis). I want to change these. Is this possible? Hi, It depends on what chart type you are using. Have a look at Jon Peltier's example for a line chart. http://peltiertech.com/Excel/Charts/Y_CategoryAxis.html Cheers Andy speet wrote: > I have a chart that has the date across the bottom (category axis) and the > data up the side (value axis). I want to change these. Is this possible? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info =?Utf-8?B?c3BlZXQ=?= Wrote: &...

Transaction Dates
Bill Gates just can't make it easier can he? Ever since my bank upgraded their software I am having the worst time with e-pay's & x-fers thru money. Can someone help me understand why? When I submit a payment via Money the program tells me it has to change the date because it can't be processed on that day. For example; Today I requested that 3k be transfered from my savings to my checking. In the past the transfer would go thru and there was no issue. Now I get a message that says my bank doesn't have enough time to do the transfer and the date must be modified ...

a valid exchange rate not found for the return date
Anyone ever seen this message? There is no relative help in knowledgebase and what there is - we have covered. Not sure why GP is saying we don't have a valid exchange rate only when doing a return. The return is within the month and the exchange rate table is active for a period long before and long after this date. We've been trying to solve for days now and the error makes NO sense at all. Please help ...

date shows none in out of box
Cannot send e-mails, I can compose an e-mail and it goes into the outbox but will not send. The date shows none in the outbox. Every e-mail I compose goes into the outbox but the date shows none. Please advise Michael wrote: > Cannot send e-mails, I can compose an e-mail and it goes into the > outbox but will not send. The date shows none in the outbox. Every > e-mail I compose goes into the outbox but the date shows none. > Please advise Version of Outlook? Type of Mail Server? If pop/imap, does it go if you do a Send/Recieve? Did it ever work? Any known changes between i...

I Keep getting the messeage that the graphic is too large, or the.
I keep getting the messege, your graphic maybe too large or your memory too low! This can't be, as I have a 200g hard drive, and all my web-sites worked before I reformatted the computer! What version Publisher? How big (resolution) is the image? -- Mary Sauer MS MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Grizza" <Grizza@discussions.microsoft.com> wrote in message news:1543D4A8-EA75-4E24-AAAE-9F9E14AA7994@microsoft.com... >I keep getting the messege, your graphic maybe too large or your memory too > low! This can't...

Add Date
We have a spreadsheet that we would like to automatically add the date in the first cell of each row when information is entered into another cell in that row. The date would need to remain static once added. Any suggestions? This worksheet_Change event will update the date in column A each time there's a change anywhere else in the row. Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim myCell As Range Dim myRngToCheck As Range Dim myIntersect As Range With Me Set myRngToCheck = .Range("B1", .Cells(.Cells.Count...

How do I get Outlook 2003 to work with Windows 7?
I have a new computer with Windows 7 pre-installed. Can't get Office 2003 Small Business but specifically Outlook 2003, to work. When I try to open I get the following error message : Unable to open your default e-mail folder. Outlook could not start because a data file to send and receive mail could not be found. To add a data file, such as a personal folder file, douible click the mail icon in windows control panel. I've tried to do taht withour any success at all so any suggestions very welcome!!! Many thanks -- Vosk Was there a preinstalled Trial of Off...

Getting Excel Data from One Sheet to Another....
Hey Guys, I have the following Excel problem at work and I am not sure how to solve it. Here is the low down: Excel Sheet #1 Data (First line is the header - [Person and Job]) Person Job --------------------------------------- Fred ? Fred ? Sam ? Kevin ? Kevin ? Julie ? Excel Sheet #2 Data (First line is the Header - [Person and Job]) Person Job --------------------------------------- Fred Mop Boy Julie Hostess Sam Burger Man Kevin Manager Now here is the situation that I have. Based on the how the "Person" Column corresponds to the "Job" Column in Exce...

Why would someone get a read receipt if it wasn't set
Outlook 2000 Windows 2k Someone got a message with a read-receipt and it wasn't set up for that. It happened on two internal messages. Are you using Exchange with Outlook? If yes, the default behavior of Outlook 2000 with Exchange is to send a read receipt. The option is normally greyed out so the user cannot change it. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, Crimson asked: | Outlook 2000 | Windows 2k | | Someon...

How do I create a poster consisting of 4 x A4 pages which get glue
I know this can be done as I have done it some yaers before. It may have been in Power Point however. As I remember I created the poster content on the word document page and then using some option/s one is able to segment the page into 4 quarters, print these and then glue them together. I am using Microsoft Office Student and Teacher 2003 Word cannot create posters - try Publisher. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP...

How to get rid of "A formula in this worksheet contains one or more invalid references"
Frequently I'll delete some cells in an Excel 2007 worksheet and from then on get the message "A formula in this worksheet contains one or more invalid references." whenever I try to do anything in the worksheet. There are no invalid references, as I have verified. Possibly there were some temporarily while Excel was in the process of deleting the cells. If I save the file, exit Excel, then reopen the workbook, Excel changes its mind and decides there aren't any invalid references after all (at least the message goes away). Is there any way to get Excel to figure t...

I want the day of the week when I insert a date
Excel 2003 WindowsXP I am creating a spreadsheet and inserting many dates. I want to insert the date and have the day of the week of that particular date appear. Otherwise I would have to look up years worth of dates. Is there a way to do this? Thank you. Right-click on the cell with the date you wish converted to "Weekday" > Format Cells > NumberTab > Custom > and type dddd in the little window....> ok Vaya con Dios, Chuck, CABGx3 "HT" wrote: > Excel 2003 > WindowsXP > > I am creating a spreadsheet and inserting many dates. I want to ...

IF Function with Dates
Hello, I hope someone can help me. I would like to create an IF function for dates in my worksheet. I have a Start Date column and End Date column. If the date in the Start Date and End Date falls within the Fiscal Year(06), then I want to display a 1, otherwise a 0(zero). A1=7/01/06 (Start Date); B1=6/30/10 (End Date) FY06 is from 7/1/2005 to 6/30/2006 What I have in C1 is =IF(AND(A1>=7/1/2005,B1<=6/30/2006),1,0) My result for FY06 is 0, but that's not correct because the End Date is not until 12/31/2010, so it falls within the FY06. I want this formula to...

Message keeps sending every day...
We have a client with 4 Citrix servers and Microsoft Exchange 2000 with Outlook 2000 running in the thin client sessions. One of the users at this company received a joke message with no attachments and forwarded it on to some of her colleagues and friends at other companies. Now, the same message is being sent every day or every other day to everyone on the list. To make matters worse, she sent an email out to all of them saying she was sorry for all the trouble with it and now that message is being sent to them every day. I can't find anything in the Outbox. There are no rules...

comparing two lists again
I have two large lists (15k and 13k) and I need to find those values whishch appear in list A but not in list B Vlookup only does on line at a time. I need a quick way of comparing list A with list B and showing me the results of those that only appear in one list. any ideas? See my post to Joe about "I need to compare 2 lists" -- Don Guillett SalesAid Software donaldb@281.com "Jon Robinson" <Jonathan.Robinson@yahoo.com> wrote in message news:07a701c3c3c8$a58099d0$a501280a@phx.gbl... > I have two large lists (15k and 13k) and I need to find > those val...

how do I calculate times and get as a result numbers
I got a Spreedsheet that I whant to use as a time sheet, this is so far what I got done wrong what I want to get is right a1= 10:00am time in a1= 10:00am b1= 2:00pm time out (lunch) b1= 2:00pm c1= 2:30pm time in (lunch) c1= 2:30pm d1= 8:00pm time out d1= 8:00pm e1= 8:30 total e1= 8.5 the answer has to be a number if the time is #:0<= #:14 = #.0 #:15<=#:29 = #.25 ...

Autorun macro by date
This is a repost as my one this morning doesn't appear to have saved, so ap;ologies if I end up raising the same question twice. I have a macro called 'Update_Me'which I would like to run automatically on the first of each month (when excel is opened, obviously). How do I go about this? Thanks in advance Steve Try something like: Sub Workbook_Open() Dim dToday As Date dToday = Now If Day(dToday) = 1 Then 'rest of code here End If End Sub --- Place this in ThisWorkbook module. HTH Jason Atlanta, GA "Steve" wrote: > This is a repost as my one this morni...

How do I enter dates with one keystroke
I am new to excel. This may be the stupidest question of all time, but I would like to know how to assign, program, or whatever you call it in excel a date to a key so that when I am in a cell and want to enter that date all I have to do is use one keystroke. For example, can I somehow assign a date like 07/26/08 to the F10 key so that every time I press F10 the date 07/26/08 is entered into the cell where the cursor is? Thanks in advance for any help you can provide me. -- barefoot This may not be exactly what you're looking for, but to enter the current date in a cell click ...

how to get account data from a contact in the opportunity `
Hello crm-gods, how can i get the accountid (guid) from an contact in the opportunity, to set it in an extra field ? This script isn't really giving me the guid, i fear: var oCustomer = new Array(); oCustomer = event.srcElement; var oAccount = crmForm.all.new_account; if (typeof(oAccount) != "undefined" && oAccount != null) { if (typeof(oCustomer) != "undefined" && oCustomer != null) { var id = oCustomer.DataValue[0].id; var typename = oCustomer.DataValue[0].typename; if (typename == "contact") { //Create a new HTTP...

How does one view two separate pages within the Publisher main win
I have figured out how to "Insert" a second page either before or after the current page, but am unable to scroll from one to the another. Is this not 'doable' within Publisher? The only way I am able to view both pages is to print the entire document. Thank you. ReBell in MS Try View - Status bar. Look in the lower left corner of the Publisher screen -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "rebell" <rebell@discussions.microsoft.com> wrote in message news:8D3450ED-BA78-47FE-B286...