Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2010, 07:10 AM
MPAVLAS MPAVLAS is offline Need a date formula Windows XP Need a date formula Office 2007
Novice
Need a date formula
 
Join Date: Aug 2010
Posts: 1
MPAVLAS is on a distinguished road
Default Need a date formula

Need to determine the number of years between two dates.

12/03/1968 - 12/31/2010
Reply With Quote
  #2  
Old 08-10-2010, 07:43 AM
mugezhn mugezhn is offline Need a date formula Windows XP Need a date formula Office 2007
Novice
 
Join Date: Jul 2010
Posts: 16
mugezhn is on a distinguished road
Default

Asumming the dates are in cells A1 and A2 respectively, you can use the following formula:

=YEAR (A2)-YEAR(A1)
Reply With Quote
  #3  
Old 08-11-2010, 04:05 AM
nsv nsv is offline Need a date formula Windows XP Need a date formula Office 2003
Novice
 
Join Date: Jul 2010
Location: Denmark
Posts: 17
nsv is on a distinguished road
Default

That solution gives you one whole year between Dec. 31st and Janury 1st even though there is only one day between them, so perhaps you should also try:
Code:
 
=ROUND((A2-A1)/365.25,0)
NSV
Reply With Quote
  #4  
Old 08-12-2010, 10:04 PM
SmokingMan's Avatar
SmokingMan SmokingMan is offline Need a date formula Windows 7 Need a date formula Office 2007
Novice
 
Join Date: Aug 2010
Location: Indiana, USA
Posts: 5
SmokingMan is on a distinguished road
Default

Assuming cell A1(12/3/68) and B1(12/31/10). Another way would be that in the target cell enter =(B1-A1)/365. You can then format the target cell as a number with no decimal points and it will give you the same answer of 42. Either way gives you the same answer.

Excel stores the date as a number so you can use the same math with dates as you do with numbers. Format a cell as a number and type in a date. You will see how Excel stores it. It counts the days from 1/1/1900 to come up with the current date. For example today's date (8/12/10) is stored as 40402.

I hope this wasn't too much information, but it gives you an idea how Excel works with dates.


Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
date in forms gilgold Word 2 05-28-2010 01:19 PM
Need a date formula Julian Date windseaker Excel 1 02-14-2010 01:44 AM
new appointment date always reverts back to today's date msills Outlook 0 08-24-2007 08:57 AM
Date format always interpreted as a formula Butch Jackman Excel 1 02-14-2006 11:27 AM
Need a date formula Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft