Excel 2010
Excel 2007
Excel 2003
Tips & Tricks
Excel Forum
Course Index CIG Excel Book
 
Tutorials   News   Tips   Forums   Help   Logon   Order  
 
     
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   

  Access   Excel   Word   Windows   FrontPage   Hardware   Misc

 

Adding Dates & Times in Excel
 
Q: I'm using Microsoft Excel 2003. How can I take a date, say 12/10/2007, and add 2 months to it?
 
A: The simple way to add dates and times is to simply add values of 1 for each day. For example, if you have 1/1/2008 in cell A1, then you could say =A1+60 in cell B1 to add roughly two months to that date. This is good enough for most cases, and it works fine for weeks (adding 7 days).

You can do the same thing with times if you realize that an hour is 1/24th of a day. If you want to add 6 hours to a time (1/4 of a day) then you could say =A1+(1/4). If you want to add 5 hours, just say =A1+(5/24).

Now you just have to format the cell as a TIME and you get the right answer.

Now like I said, this is usually good enough for most cases. But what about when you really need to be exact? Well, you can use Excel's DATE and TIME functions for more exact date arithmetic. For example. Let's say you need to add 2 months again. This time, however, the start date is 3/1/08. Adding 60 gives you the wrong date.

So now we need something a little more advanced. Try using the DATE function: =DATE(YEAR(A1), MONTH(A1)+2, DAY(A1))

That adds exactly 2 months to the date in A1. You can do the same trick to add years or days. For example, this will add 5 years, 6 months, and 10 days to the date in A1: =DATE(YEAR(A1)+5, MONTH(A1)+6, DAY(A1))+10

Now adding TIME works just a little bit differently. If you want to add 6 hours to a cell use the TIME function like this: =A1+TIME(6,0,0)

Yes, the value comes up with a strange 1/0/1900 20:00 at first, but if you just format the cell as a TIME value, it's correct. The TIME function basically is =TIME(hours, minutes, seconds). So if you want to add 2 hours, 15 minutes, 10 seconds, you would say: =A1+TIME(2,15,10).

I cover dates and time in much more detail in my Excel 232 tutorial. I'll also show you how to calculate the difference between two dates or times, and teach you more about how dates and times are stored internally inside Excel.

 

You may want to read these articles from the 599CD News:

 

 
Learn
 
Microsoft Access
Microsoft Excel
Microsoft Word
Microsoft Windows
Microsoft PowerPoint
Adobe Photoshop
Visual Basic
Active Server Pages
Online Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
WalkThru Tutorials
Free Upgrades
Insider Circle
Info
 
Latest News
New Releases
User Forums
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Help
 
Live Chat
Customer Support
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Live Chat
General Contact Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Try Us
 
Free Lessons
Online Theater
Mailing List
Course Indexes:   Microsoft Access   Microsoft Excel   Microsoft Word   Microsoft PowerPoint   Visual Basic (VB)   Photoshop   Active Server Pages (ASP)  
Keyword Search Cloud:   What's This?   courses   microsoft access tutorials   vlookup   access   cartesian   excel   dlookup   vba   attendance   access 2007   sql   windows 7   combo box   pivot table   visual basic   test   iif   word   calendar   query   conditional formatting   pivot tables   photoshop   hlookup   access 101   excel 202   excel 2007   student attendance   update query   my account   word 2007   append query   quickbooks   queries   dsum   reports   powerpoint   if   microsoft access   dmax   mail merge   relationships   ms access   access 2010   vb   dcount   subforms   excel 2003   handbooks   html   599cd   combobox   if function   security   microsoft word   after update  
Copyright 2012 by 599CD.com, All Rights Reserved