exceltimelibreofficeopenoffice-calclibreoffice-calc

How to subtract a time constant in a LibreOffice/OpenOffice/Excel formula?


In a LibreOffice/OpenOffice spreadsheet, cell A1 contains a time, as does cell B1.

Cell C1 contains the formula =B1-A1, which returns the difference between the times (which gives me the duration of an event).

Instead of C1 being the exact duration, I want it to be the duration minus 1 hour and 45 minutes. I have tried =B1-A1-1:45, =B1-A1-01:45, and =B1-A1-1.75 but none of these work.

How can this be accomplished?


Solution

  • You can use TIME()

    =B1-A1-TIME(1,45,0)
    

    or put the time in quotes:

    =B1-A1-"01:45"