Search code examples
sqlmysqldatediff

Is there a way to subtract an amount of days from a date in SQL?


I know about DATEDIFF(d, date1, date2), but I am not looking to subtract two dates, rather an amount of days from a date.

For example:

"2010-04-13" - 4 = "2010-04-09"

Is that possible with mySQL?


Solution

  • date_sub(date,interval 4 day);