`Karl Posted August 29, 2009 Share Posted August 29, 2009 I have a table to record when a record has been updated, see below. `modifiedon` = current_date However, when I produce the output, the format is YYYY/MM/DD, I want the output to be DD/MM/YYYY, which would be the best way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 29, 2009 Share Posted August 29, 2009 http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/#findComment-908976 Share on other sites More sharing options...
`Karl Posted August 29, 2009 Author Share Posted August 29, 2009 I've had a read, and a mess around, but I still can't figure out how to do it. Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/#findComment-909003 Share on other sites More sharing options...
`Karl Posted August 30, 2009 Author Share Posted August 30, 2009 Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/#findComment-909252 Share on other sites More sharing options...
PHPro Posted August 30, 2009 Share Posted August 30, 2009 SELECT DATE_FORMAT('2009-11-11', '%D %M %Y'); Try that and just mess around and figure it out. Try with more detailed question next time. Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/#findComment-909257 Share on other sites More sharing options...
`Karl Posted August 30, 2009 Author Share Posted August 30, 2009 What more can I add? I'm using the Current_Date to add the date to the database and I want the output to be different, which is what I put in my question. The question isn't detailed, and I tried what you posted before you even suggested it. Yet it makes no difference. Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/#findComment-909281 Share on other sites More sharing options...
Daniel0 Posted August 30, 2009 Share Posted August 30, 2009 Then perhaps you should try posting the queries you've attempted to use and don't work. We can't really tell from "I've tried a number of different things". "Doesn't work" isn't very descriptive either. It can mean many things such as 1) unexpected result, 2) no output, 3) errors, etc. You should always tell what result you expect, what result you get and any errors that pop up. Quote Link to comment https://forums.phpfreaks.com/topic/172395-current_date/#findComment-909362 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.