I want to get between dates in between two inputs

1
Hi all, I want to get the between Dates in between two input date parameters. can anyone help me out with this. While using days between function we are getting only the days count i.e.. the decimal  what i need is the dates between tho two input dates
asked
4 answers
1

Would any of these functions do the trick?

https://docs.mendix.com/refguide/between-date-function-calls/

If not, please explain a bit further what you mean with “date between”

answered
1

I think you could use a while loop for this.

  • Use daysBetween() for your two dates
  • Create a list of DateTime,
  • Place a while loop with condition $daysBetweenVariable > 1
  • In the loop use addDays($date, 1) (use the lower date as variable here), save the date to the list and subtract one from the “daysBetweenVariable”

 

At the end you should have a list of dates that lie between the two selected dates. 

answered
1

Not sure what you will be using this for, but maybe you can use widget ‘Calendar’ or widget ‘Scheduling’ and set the start-date and end-date in their parameter-values. Might give you an interface that you are trying to build.

answered
0

HI Umamaheswara Padhi,

There is not function for this use case. You can either write a custom Java action to achieve this or You can create custom logic in microflow.

You can use the Days between function to get the days between and you can use Add days function by adding days until it matches the end day.  I would suggest creating a java action. 

You can refer this link for java : https://www.baeldung.com/java-between-dates

answered