Lee Posted January 28, 2011 Share Posted January 28, 2011 At which point do I use DATE_FORMAT()? On insert, on select, or ideally can I use it when I echo it out? I haven't used this function before, so I'm not too familliar with it. Can I do something like this?.. echo DATE_FORMAT($item['created_at'], '%d/%m/%Y'); Quote Link to comment https://forums.phpfreaks.com/topic/225955-at-which-point-do-i-use-date_format/ Share on other sites More sharing options...
l4nc3r Posted January 28, 2011 Share Posted January 28, 2011 For any general questions on functions, just use the manual. http://php.net/manual/en/function.date-format.php Quote Link to comment https://forums.phpfreaks.com/topic/225955-at-which-point-do-i-use-date_format/#findComment-1166543 Share on other sites More sharing options...
PFMaBiSmAd Posted January 28, 2011 Share Posted January 28, 2011 The syntax you have posted is that of the mysql DATE_TIME() function. You would use that in your SELECT query statement when you retrieve the data from your database table. Quote Link to comment https://forums.phpfreaks.com/topic/225955-at-which-point-do-i-use-date_format/#findComment-1166574 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.