D
D
d1zz742021-06-21 12:10:57
MySQL
d1zz74, 2021-06-21 12:10:57

How to select an entry that starts with a specific date?

For example, there is a table:
journal_id | date |
213 | 09/05/2020
213 | 08/06/2020
333 | 01/01/2021
333 | 01/01/2021

And you need to output a log in which the earliest date starts from 01/01/2021. (very first entry)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sand, 2021-06-21
@sand3001

SELECT * FROM table_name WHERE DATE(date) >= DATE(2021-01-01);

Try like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question