Slick: Filtering all records which have a joda DateTime date equal to today
问题 One way to achieve it would be like this: val now = DateTime.now val today = now.toLocalDate val tomorrow = today.plusDays(1) val startOfToday = today.toDateTimeAtStartOfDay(now.getZone) val startOfTomorrow = tomorrow.toDateTimeAtStartOfDay(now.getZone) val todayLogItems = logItems.filter(logItem => logItem.MyDateTime >= startOfToday && logItem.MyDateTime < startOfTomorrow ).list Is there any way to write the query in a more concise way? Something on the lines of: logItems.filter(_.MyDateTime