Most users have worked with Excel dates and times, to some extent. However, not all users fully understand the way that dates and times are stored within Excel, and this prevents them from getting the most out of their Excel functions and formulas.
Excel dates and times are actually stored as simple numbers within Excel. It is only the Formatting of a spreadsheet's cells, that causes a number to be displayed as a date, time, or date & time.
Within Excel, dates and times are coded as follows:
Dates  Stored as positive integers. For example, on the windows operating system:
 
Times  Stored as decimals, between 0 and 1, which represent a proportion of the day. For example:
 
Dates & Times  Stored as decimals, comprised of
For example, on the windows operating system:

A  B  

1  20/08/2010  31/08/2010 
2  13:00  17:15 
3  30/08/2010 17:00  31/08/2010 09:00 
4  30/08/2010 17:00  23:00 
Because Excel stores dates & times as numbers we can add, subtract and compare dates and times in Excel in the same way that you would add or subtract any other numbers.
The following examples use the date and time values in the example spreadsheet on the rightabove to illustrate the addition and subtraction of dates and times in Excel.
The results in of the above Excel date and time formulas will generally NOT have the correct formatting when first input into your spreadsheet. This will give the initial impression that the formula has not worked  however, this is not the case.
The cells can be made to show the correct result by formatting into a 'General', 'Date', 'Time', or 'Date & Time' format.
To do this :