Home Sql Sqldate Mysql Date Minus Days



Mysql Date Minus Days
Posted on: January 20, 2009 at 12:00 AM
The Tutorial cover on Mysql Date Minus Days return you the day after subtracting from current date.

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)

Related Tags for Mysql Date Minus Days:
sqlmysqlcdatetutorialtracreturnriatoefromcurrentinsubmnttrminminusminusminaftersubtractoverdaytorsurnsudaysatracmycoveracttutorssrirenthafmionomo


More Tutorials from this section

Ask Questions?    Discuss: Mysql Date Minus Days  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

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.