Level 46
I don't think that's a valid date format.
Try 00:00:00 and 12:00:00 and you might need to do some trickery in SQL to cast the dates as time.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to figure out how to query a table in my database for all events that start in the morning so between midnight and say midday tried the following but not having much luck. Any ideas?
$sessions->whereBetween('start_date',array(00:00,12:00));
Think I've got there:
$sessions->whereRaw("TIME (`start_date`) BETWEEN '{$cut_offs[$filter][0]}' AND '{$cut_offs[$filter][1]}'");
Please or to participate in this conversation.