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) |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Mysql Date Minus Days
Post your Comment