Use ExecuteSQL to sum time fields

Discussion created by thehalpeen on Jan 19, 2017
Latest reply on Jan 19, 2017 by okramis

I'm trying to sum a column of time fields in a set of records:


I'm using the following formulas:


ExecuteSQL ( "SELECT sum NUMVAL(TotalTime) FROM Events"; "" ; "")




ExecuteSQL ( "SELECT sum (TotalTime) FROM People_Shifts"; "" ; "")


Note: The field 'TotalTime' is a time field.


Neither of these work - I'm getting a '?'.


Can we add time fields using ExecuteSQL?