Hello Gonçalo,
Hope you're doing well.
If you want to get the difference in hours between two Date Times, you can use indeed DiffHours() function.
However, according to your image, your error states that the platform can't identify DataCriacao variable. It seems that you don't have a variable called DataCriacao, that's why that error is returned.
According to your inputs in UpdateTasks action, the names for those inputs are Data and DataFim, perhaps those are the variables that you want to use.
Hope that this helps you!
Kind regards,
Rui Barradas