Posts tagged with “date

Using MySQL DATE_SUB to SELECT rows relative to a date range

DATE_SUB can be very handy if you’re trying to return rows from a database table relative to a date range. As the name suggests, it SUBtracts a time value from a DATE. It expects a date, as well as an INTERVAL argument consisting of a unit (such as DAY, WEEK, or YEAR) and quantity, like […]