BDM custom query timestamp

1
0
-1

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

2 answers

1
0
-1

Thanks for your help
Worked with small adjustments
http://localhost:8080/bonita/API/bdm/businessData/com.company.model.MyMO...

Comments

Submitted by Sean McP on Mon, 04/24/2017 - 23:09

as I said off the top of my head, I wasn't near my full computer when i wrote the reply... :)

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

1
0
-1

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.

Notifications