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

Chapter 11. Working with Dates and Times > Figuring Out Date and Time Arithmeti...

11.7. Figuring Out Date and Time Arithmetic

11.7.1. Problem

You need to do some kind of arithmetic with dates and times.

11.7.2. Solution

If you can't get the answer you need using the date command (see Section 11.3, "Automating Date Ranges"), convert your existing dates and times to Epoch seconds using Section 11.4, "Converting Dates and Times to Epoch Seconds," perform your calculations, then convert the resulting Epoch seconds back to your desired format using Section 11.5, "Converting Epoch Seconds to Dates and Times."


  

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