9
I’m doing a database query, and I plan to list the records for the current week. It would be something based on the question about retrieve data from last 7 days from current date, but instead of being from the current date, it would be the beginning of the week.
See below the table columns tbl_vacina
:
+------------+--------------+-------------------+
| ID | vacina | data_criacao |
+------------+--------------+-------------------+
| 1 | Cinomose |2017-06-10 10:11:15|
+------------+--------------+-------------------+
| 2 | Coronavirose |2017-06-09 10:11:15|
+------------+--------------+-------------------+
id
- intvacina
- varchar(512)data_criacao
- timestamp
How would a query to return all records saved in the current week?
Confirmed, it works. kkk I should have insisted more on this solution, it’s even more elegant. I had already voted +1 on it.
– Bacco
Thank you, there are two versions (+1):)
– bruno
I find this the most suitable to be marked as accepted
– Bacco
It worked beauty! Thank you!
– viana