Fearpig Posted May 21, 2007 Share Posted May 21, 2007 Hi Guys, This is probably a really simple one but I'm not sure what I should be searching for. I've got three integers - Day, Month and Year, how do I convert them into a date value? Could someone point me in the right direction? Cheers. Link to comment https://forums.phpfreaks.com/topic/52314-solved-make-a-date-out-of-day-month-and-year/ Share on other sites More sharing options...
jitesh Posted May 21, 2007 Share Posted May 21, 2007 echo date("Y-m-d",mktime(0,0,0,$month,$day,$year)); Link to comment https://forums.phpfreaks.com/topic/52314-solved-make-a-date-out-of-day-month-and-year/#findComment-258101 Share on other sites More sharing options...
MadTechie Posted May 21, 2007 Share Posted May 21, 2007 try <?php $nDate = mktime(0, 0, 0, $Month, $Day, $Yr); ?> edit: jitesh is nicer Link to comment https://forums.phpfreaks.com/topic/52314-solved-make-a-date-out-of-day-month-and-year/#findComment-258102 Share on other sites More sharing options...
Fearpig Posted May 21, 2007 Author Share Posted May 21, 2007 Thanks Jitesh helped me out again! Link to comment https://forums.phpfreaks.com/topic/52314-solved-make-a-date-out-of-day-month-and-year/#findComment-258107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.