npsari Posted April 16, 2007 Share Posted April 16, 2007 I have a row called Date in the databse which is saved as 0000-00-00 When I try to echo it, it shows like that 2007-04-16 Maybe because I use this normal code: echo $row['Date']; How can I display it like that: 16-04-2007 Quote Link to comment https://forums.phpfreaks.com/topic/47306-solved-displaying-the-date-in-a-different-format/ Share on other sites More sharing options...
per1os Posted April 16, 2007 Share Posted April 16, 2007 $time = strtotime($row['Date']); echo date('d-m-Y', $time); Something like that should work. Quote Link to comment https://forums.phpfreaks.com/topic/47306-solved-displaying-the-date-in-a-different-format/#findComment-230773 Share on other sites More sharing options...
npsari Posted April 16, 2007 Author Share Posted April 16, 2007 Done Thanks pal You are a ginius Cus this was a simple and effecetive solution Quote Link to comment https://forums.phpfreaks.com/topic/47306-solved-displaying-the-date-in-a-different-format/#findComment-230777 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.