MySQL: Read out Records of last Week
Question by Compi | 2016-04-24 at 17:05
I am searching for a possibility to read out all data sets from my MySQL database which are not older than one week.
Each record has a TIMESTAMP column named "dat" in which the date of the entry is written. I have to compare this column with the date before one week, I think. Is this possible somehow?
Related Topics
MySQL: Delete Data from Table - Difference between TRUNCATE, DELETE and DROP
Tutorial | 0 Comments
MySQL: How many records have been found or are affected by my query?
Info | 0 Comments
PHP: Determine Week Number
Tutorial | 0 Comments
PHP: Wrong Year for first Calendar Week
Question | 1 Answer
MySQL: Display search results on multiple pages
Tutorial | 0 Comments
MySQL: Regular Expressions in MySQL queries
Info | 0 Comments
Using MySQL as a Calculator
Tip | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Of course, that is possible.
You can just use the following query for that:
Or you can also use this:
Instead of writing "INTERVAL 1 WEEK" you can also write "INTERVAL 7 DAY" to get the same result.
2016-04-25 at 19:05