I have a sheet with three columns: Name (A), startTime (B), endTime (C), and have been trying to run a Google Sheets QUERY that will show the duration (endTime - startTime
).
The problem appears to be how the QUERY is recognizing the startTime
and endTime
values.
I've formatted the cells to look like: 10:00AM, 4:30PM
. When I click on the original sheet on the same value they appear as: 10:00:00 AM, 4:30:00 PM
.
When I click on the value after performing the query:
=QUERY(Sheet1!A:C, "select A, B, C")
it looks like: 1/1/1900 10:00:00, 1/1/1900 16:30:00
.
I have tried:
=QUERY(Sheet1!A:C, "select A, C-B")
Error:Can't perform function difference on values that are not numbers
=QUERY(Sheet1!A:C, "select A, dateDiff(C,B)")
Error:Can't perform function 'dateDiff' on values that are not a Date or DateTime values