thestars Posted April 29, 2009 Share Posted April 29, 2009 A date is given, not the current date.Its a random date not in the date time format(eg:30/04/2008). I have to get the very next date after that date.Please help with code in php Link to comment https://forums.phpfreaks.com/topic/156103-date-manipulation-adding-one-day-to-a-given-date/ Share on other sites More sharing options...
rhodesa Posted April 29, 2009 Share Posted April 29, 2009 try this <?php $date = '30/04/2008'; list($d,$m,$y) = explode('/',$date,3); $date = date('d/m/Y',mktime(0,0,0,$m,$d + 1,$y)); echo $date; ?> Link to comment https://forums.phpfreaks.com/topic/156103-date-manipulation-adding-one-day-to-a-given-date/#findComment-821950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.