ROCLASI:
Hi Bogdan,For date ranges (and number ranges) you can use the … operator in Servoy.
Servoy translates that to the BETWEEN sql statement.So your code would be like this:
function addDateRangeCondition1(foundSet) {
// yes this is one single line of code
foundSet.booking_start = “#” + utils.dateFormat(globals.vReservationsSelectedDate, “yyyy-MM-dd”) + “…” + utils.dateFormat(globals.vReservationsSelectedDateEnd, “yyyy-MM-dd”) + “|yyyy-MM-dd”;
}
Hope this helps
Thanks! I’ll try this, but I don’t need only ranges. See condition 3. I also need to check if one date field is greater then a date and another date field lower then another date. How can I do that?