BDM custom query timestamp

Hi,
I would like to construct a custom query to select a range of dates, example select * where datetime between start-date and end-date

Just create a custom query to the BDM as follows:

SELECT d FROM dateTest d WHERE d.d1 > :startDate AND d.d1 > :endDate ORDER BY d.d1 ASC

where d1 is the date field and startDate and endDate are defined as parameters in the query

so you would call it as follows:

…/API/…/q=myDateQuery&startDate=‘2017/02/01’&endDate=‘2018/05/01’

or something like that off the top of my head.

regards
Seán

PS: As this reply offers an answer your question, and if you like it, please Mark UP and/or as Resolved.

Thanks for your help
Worked with small adjustments
http://localhost:8080/bonita/API/bdm/businessData/com.company.model.MyMODEL?q=myDataQuery&p=0&c=1000&f=startDate=2017-04-21&f=endDate=2017-04-25

as I said off the top of my head, I wasn’t near my full computer when i wrote the reply… :slight_smile:

Now you can mark it as resolved so everyone knows that it has been answered :slight_smile: