How do I setup a DiffHours?
Application Type
Traditional Web


So, basically I am doing a ScrumBoard and I want to see the diference between the date and time I started and the date and time I finished. So, I know that that is a DiffHours(DateTime, DateTime) which tells me that but I am having a hard time setting it up.

So. Basically my dt1 is Data(last time it was updated) and my dt2 is DataCriacao(date that task was created)

I will post some printes, please help and if you need something more, tell me :)


Rank: #95

Hello Gonçalo,

So you'll need to do a query (Aggregate) in order to fetch that data from the database. It seems that you want to get this data from your Task entity.

After the query, you should pass that value in your DiffHours() action :)

Here's an example:

Kind regards,

Rui Barradas

Rank: #295

Drag and drop the same Task data entity in your action flow and use DataCriacao attribute of this aggregate in to your expression.

Your expression will become as following after using same entity in action flow:

DiffHours(GetTaskData.list.current.DataCriacao, Data)

Hope you understood , Thanks

Rank: #95

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

Rank: #295

Hi Goncalo,

Are you storing the dt1 and dt2 in database or somewhere else? Actually the expression editor is not able to find out the dt2 you have. You need to give it a proper reference.