We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to execute mysql timeediff or timestampdiff in phql

How can we find the number of hours timediff btwn two database fields? Is the only way using raw SQL?

Did you try using the model manager?

https://docs.phalcon.io/en/latest/reference/phql.html

You could perhaps add a method in your model as well.