{"id":520,"date":"2018-06-28T11:42:03","date_gmt":"2018-06-28T11:42:03","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=520"},"modified":"2024-03-30T11:00:57","modified_gmt":"2024-03-30T11:00:57","slug":"mathematical-operations-on-date-and-time","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/training\/mathematical-operations-on-date-and-time\/","title":{"rendered":"Mathematical Operations on Date and Time in Excel"},"content":{"rendered":"\n
You can perform such arithmetic operations as addition or subtraction not only on numbers but also on dates. In this lesson, I will show you a few examples of how you can do it.<\/p>\n\n\n\n
If you want to perform addition or subtraction on dates, first, you need to save them in separate cells. Let it be cell A1<\/strong> and cell A2.<\/strong><\/p>\n\n\n\n When a date includes time other than midnight (24:00:00 is the default time) then the number of days that are returned will be reduced by one. The following examples show ways to ignore time and use only the date part.<\/p>\n\n\n\n returns 33.<\/strong><\/p>\n\n\n\n In this example, the DAYS<\/strong> function returns the number of days between two dates.<\/p>\n\n\n\nA1 = January 10, 2014 15:15:00<\/pre>\n\n\n\n
A2 = February 12, 2014<\/pre>\n\n\n\n
Example 2:<\/h3>\n\n\n\n
= DAYS(A2, A1)<\/pre>\n\n\n\n
Example 3:<\/h3>\n\n\n\n
= INT(A2) - INT(A1)<\/pre>\n\n\n\n