How to use daysBetween function using 2nd date as CurrentDateTime

0
I am trying to use daysBetween to calculate number of days between date1 (for eg 25-6-2021) and date2 as CurrentDateTime. I tried to build microflow but it doesn’t return any number.
asked
2 answers
0

The variable in your microflow “Days” is not used or returned from the microflow as I see in the screenshot.  Currently microflow is returning a boolean
Can you check if you are using the result after calculating it? Returning from the microflow or storing in database?

Also, do check if your entity/startDate and entity/endDate are not empty and have some value. Then you can log the result of daysBetween and see what it calculates. Log will make it confirm that function is working correctly or not. Rest is your logic about how to display it in UI

For any details about the function, see docs here https://docs.mendix.com/refguide/between-date-function-calls#6-daysbetween

answered
0

That's because you don't do anything with the `Days` variable. In other words: assign the `Days` result to an attribute of `Student` or return it from your microflow. Now your returning a boolean false value.

answered