Tutorial Details:
In the following example you will learn about subtracting date and time Function in PHP. This date_sub Function subtracts the specified DateInterval object from the specified DateTime object.
date_sub date_subdate_sub alias DateTime::sub functions for subtracting.... It returns the modified DateTime.
Description of PHP DateSub Function
public DateTime DateTime::sub ( DateInterval $interval )
DateTime date_sub
Mysql Date Subtract
this example we use select
DATE_SUB(curdate(),INTERVAL 1DAY) that return you date one day before the
current date.
DATE_SUB(curdate(),INTERVAL DAY... to subtract from date
select DATE_SUB(curdate(), INTERVAL 1
Mysql date API
to a date and returns a new dateDATE_SUB() - Subtracts a specified interval from...)
Query DATE_SUB() :-
The below Query is used to subtract a interval of 1
year from the current date.
DATE_SUB() : The DATE_SUB ( ) Subtracts a specified interval
Mysql Date Minus Days date_sub(curdate(),interval 2 day)as Date;
Output...
Mysql Date Minus Days
The Tutorial cover on Mysql Date Minus Days return you the day after
Mysql Date Last 30 Days
;
mysql> select date_sub(now(),interval 30 day...
Mysql Date Last 30 Days
Mysql is used to find out the last 30 days from current date