Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The DATE function returns the timestamp for the given year, month, and day. To test it, place the following formula into any empty cell on the current worksheet:
=DATE(2010; 1; 1)
The result should be 40179.
Figure 12-3. Sample result of the DATE function
If you see a date like 01/01/10, which is not what you wanted in this case, change the numeric formatting of that cell to Text. In order to do that, choose Format Cells and click on the Numbers tab to change the numeric format for that cell to Text / @. The value of the timestamp might be different if you use a non-default Epoch.
One useful trick that you might want to remember is using the DATE function to automatically calculate the timestamp of a day in a year’s time. For example: