Languages
[Edit]
EN

MySql - subtract days from current date

16 points
Created by:
Kate_C
23330

In MySql, there is available DATE_ADD() function that helps to subtract days from some date. In this example we presented way how to subtract some days from current date.

1. DATE_ADD() with NOW() functions example

This example subtracts 30 days from current time.

SELECT DATE_ADD(NOW(), INTERVAL -30 DAY);

Result:

Subtract 30 days from current date operation in MySql with HeidiSQL.
Subtract 30 days from current date operation in MySql with HeidiSQL.

MySQL - dates

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join