Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Timestamp (DATE)

Syntax: DATE(Year; Month; Day)

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.

images

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 images 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:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint