I thought it was here:
https://wiki.documentfoundation.org/Faq/Base/HSQLFunctions#Numerical_Functions
However, I’ve just tested and DATEDIFF doesn’t work—it returns an error that it is unsupported.
It works fine if the embedded database is used, but not when Calc is the data source. However, some functions do still work, like ROUND.
I suppose I can get around it by adding a bunch of extra, hidden columns in the Calc spreadsheet, but that seems really ugly and clunky. A list of what actually works with Calc as the datasource would be great.