Skip to content
Advertisement

MySQL Date between query [closed]

Why BETWEEN '2020-02-22 00:00:00' AND '2020-02-22 23:59:59' is working (getting Data)?

AND why BETWEEN '2020-02-22' AND '2020-02-22' is not working (Not getting Data)?

Edited: Got it. I forgot to add date(created_at) instead of created_at

Advertisement

Answer

You may use the whereBetween method

It verifies that a column’s value is between two values.

Expl

JavaScript

Or

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement