Answer the question
In order to leave comments, you need to log in
How to group datetime by date?
I have a question, the date is stored in datetime format, I need to do something like this
===10/2/2017===
08:00 message
text 8:20 message text
===10/3/2017===
14:00 message text
15 :00 message text
Approximately grouped like this, but the question arose, how to group only the day of messages? Comment::find()->groupBy(['date'])->all()
Whether there it is necessary to translate everything into unix date format?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question