Search Database with date range

0
Is there a way to specify two dates and return the results within the range of the dates?
asked
1 answers
2

This is indeed possible. If you are using a microflow, you can use the 'retrieve' action to accomplish this.  The simplest way to do this is to use the 'retrieve from database' setting and then make an XPath constraint that looks like the following:

[MyDate > $startDate and MyDate < $endDate]

where MyDate is the name of the attribute in your entity that contains the desired Date and $startDate and $endDate are two variables that represent your constraints.  The could be input parameters, could use some of the built in DateTimes in the Modeler like '[%CurrentDateTime%]' or you could make them in another way.  For some reference on working with DateTimes chek out this documentation.

If instead, you want to filter a datagrid based on two date searches, you can add two search boxes to your data grid that reference the same variable.  Set one to 'smaller or equal' and another to 'greater or equal.'  In the screenshot below, I have done this for an attribute called 'Start Date'

 

answered