Forum Discussion

Modula's avatar
Modula
Copper Contributor
May 04, 2022

Using calculated formulas for time in lists

I have [Check-In] and [Check-Out] time and date column entries I then have a [Total Time] calculated column which uses this formula  =TEXT([Check-In]-[Check-Out],"h:mm") I can get the to...
  • RobElliott's avatar
    May 04, 2022

    Modula if I could offer a bit of advice first: don't use dashes in column names as it means the internal name of the column becomes Check_x002d_Out and Check_x002d_In and it then causes problems with calculated columns.

     

    In my example the columns are called CheckOut and CheckIn. LunchBreak is a Yes/No column. Adjusted is the calculated column that takes off 30 minutes if LunchBreak is yes.

     

     

    The formula for the Adjusted column is:

    =IF(LunchBreak=TRUE,TEXT(CheckIn-CheckOut-(1/24/60*30),"h:mm"),TEXT(CheckIn-CheckOut,"h:mm"))

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Resources