Can any one explain about how to find the date of next fefteen days based on present date,what problem is in my database i have deal_expire_date,based on that i used to display the deatils which the deal_expire_date is near to coming 15 days means deal_expire_date <=15... can some one help me in

thanks in advance

This is my query

select * from couponswhere ((deal_expire_date >=
										DATE_SUB( CURDATE( ) , INTERVAL 1
                                        DAY ) and (ISNULL(deal_promotion))) or ( (ISNULL(deal_expire_date) and (deal_promotion NOT IN('Ongoing')))))

Try something like this:

$Fifteendays = 60 * 60 * 24 * 15;
//Seconds X Minutes X Hours X Days
$Infifteendays = time() + $Fifteendays; //Unix time
//Add it to the current time
echo $Infifteendays;

//Or in 'Pretty' time
echo date("M d Y H:i:s",  $Infifteendays);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.