try this. I'm using the Nz function to convert any null to a zero
https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=112&rl=dvIf(ToDate([End Date/Time1]) > ToDate([Start Date/Time1]),// This part calculates anything pass midnight(ToTimestamp(ToDate([End Date/Time1]),[End Time1]) - ToTimestamp(ToDate([End Date/Time1]),ToTimeOfDay("12:00 am")))// This part calculates everything before midnight+ (ToTimestamp(ToDate([End Date/Time1]),ToTimeOfDay("11:59 pm")) - ToTimestamp(ToDate([End Date/Time1]),[Start Time1])) + Minutes(1),Nz([End Time1]-[Start Time1]))------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------