Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deansatch's avatar

order by date desc time asc

Is there an elqouent way to order by date and time separately. e.g. created_at order by date desc, time asc

0 likes
2 replies
MichalOravec's avatar
Level 75

You can do this

->orderByRaw('date(created_at) desc, time(created_at) asc')
1 like

Please or to participate in this conversation.