Languages
[Edit]
EN

MySql - subtract days from current date

16 points
Created by:
Kate_C
19800

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.
Native Advertising
50 000 ad impressions - 449$
ūüöÄ
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

‚̧ԳŹūüíĽ ūüôā

Join