Mysql Date Minus Days

The Tutorial cover on Mysql Date Minus Days return you the day after subtracting from current date.

Mysql Date Minus Days

Mysql Date Minus Days

     

The Tutorial cover on Mysql Date Minus Days return you the day after subtracting from current date.

Understand with Example

The Tutorial elaborate an example from Mysql Date Minus Days. To understand the example, we use the select date(now( )) Query that return the current date.

Query for viewing current date:-

mysql> select date (now());

Output:-

+--------------+
| date (now()) |
+--------------+
| 2008-12-20   |
+--------------+
1 row in set (0.00 sec)

 

Query for viewing date after subtracting 2 day from current date:-

The given below Query return you the date after subtracting 2 day from current date. 

mysql>  select date_sub(curdate(),interval 2 day)as Date;

Output:-

+------------+
| Date       |
+------------+
| 2008-12-18 |
+------------+
1 row in set (0.00 sec)