Error in dateTime

Hi, I'm trying to calculate the amount of hours someone has worked between two dates . I'm calculating it via a microflow using the between dates function in an expression: hoursBetween(dateTime($Afspraak/BeginDatum), dateTime($Afspraak/EindDatum)) I now get two errors saying : "The function 'dateTime' takes one to seven literal Integers."  I think it means that the function dateTime doesn't support non-literals, but this doesn't make sense to me, since the hoursBetween function would have no purpose. I'm quite new to mendix, so I'm probably making a small mistake. Abel
2 answers

Hi Abel,

If BeginDatum and EinDatum are data types of data and time then change your expression to 

hoursBetween($Afspraak/BeginDatum, $Afspraak/EinDatum)


This will return a decimal of the hours between the two dates.


Hope this helps!


Hi Abel,

Lose the dateTime function and it works, you don't need these. You can just use the variables.

I included an example:

Good luck!