I have a scenario where need to get data between start date and end date. In data base table.
There are many fildes and need to get data between start date and end date.
can you please help ?
Thanks,
Shailendra
Discussion posts and replies are publicly visible
This is a pretty standard use case for a!queryEntity, which can do complex filtering if needed using one or more calls to a!queryFilter (which can filter "between" two input dates).
What have you already tried? Are you having any issues in particular?
Hi Mike,
Thank you for your comment. However When I trid from strart Date I did not get any data.
I used below Query
a!queryEntity( entity: ........................., query: a!query( logicalExpression: a!queryLogicalExpression( operator: "AND", filters:{ a!queryFilter( field: "startDate", operator: ">=", value:ri!startDate ), /*a!queryFilter(*/ /*field: "endDate",*/ /*operator: "=",*/ /*value:ri!endDate*/ /*)*/ } ), pagingInfo: a!pagingInfo( 1, - 1 ) ))
That example should work if everything is configured correctly and assuming you have any entries in that database table where the startDate is on or after 01/16/2019. To double-check, you should try commenting out the entire logicalExpression call and making sure you get the expected data set back (i.e. everything, or maybe temporarily set your pagingInfo batchsize to 10 to restrict the number of entries it will return to avoid impacting performance).
What's the data type for the Start and End Dates in MySQL? date / datetime?
I am using Date type.