Clinton Posted April 16, 2008 Share Posted April 16, 2008 I've got this code: <input type="text" name="dob" value="<? echo $row{'dob'}; ?>">> It pulls out the data just fine but it displays it Y-m-d. How can I get it to display m/d/Y ? Thanks! Link to comment https://forums.phpfreaks.com/topic/101404-solved-easy-date-format-question/ Share on other sites More sharing options...
rhodesa Posted April 16, 2008 Share Posted April 16, 2008 <input type="text" name="dob" value="<? echo date('n/j/Y',strtotime($row{'dob'})); ?>">> refer to http://us.php.net/date for more on the format switches Link to comment https://forums.phpfreaks.com/topic/101404-solved-easy-date-format-question/#findComment-518625 Share on other sites More sharing options...
Clinton Posted April 16, 2008 Author Share Posted April 16, 2008 strtotime... that's right. Thanks a lot! Link to comment https://forums.phpfreaks.com/topic/101404-solved-easy-date-format-question/#findComment-518630 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.