DateGetHour4Method returns the NumericExpression DATEPART('hh', expr) which is not valid.
The correct expression is DATEPART(hh, expr).
To fix the issue is necessary to add the next line to generate the expression without quotes:
DateGetMinute4Method and DateGetSecond4Method are affected by the same issue.
Thanks in advance.