BarneyJoe Posted August 9, 2007 Share Posted August 9, 2007 Hopefully a quick question on date formatting... Basically I have a few date fields in a table - last updated, next check due etc. There's also a DateAdded field which defaults to the date the record was created. The default format was 2008-01-01, but I've got that displaying using a recordset in Dreamweaver : SELECT date_format(DateAdded, '%%D %%b %%Y') as formatted_date FROM developments WHERE DevelopmentID = %s", $colname_dateformat1); This is fine. Following this principle I've done another couple for other dates and dropped them in. For dated I'd already added in the 2008-01-01 format, they display correctly. But my problem now is with entering them - as far as I can tell I'm drawing a blank with either 2008-01-01 or '%%D %%b %%Y' What's the best practice for entering them in the first place? Cheers, Link to comment https://forums.phpfreaks.com/topic/64092-date-formatting-question/ Share on other sites More sharing options...
BarneyJoe Posted August 9, 2007 Author Share Posted August 9, 2007 OK solved the first part. And I've just put (YYYY-MM_DD) in brackets by the date fields, so I guess that'll do. I guess as a non techie coming from an Access background, I'm used to it automagically changing pretty much anything entered into the format for the field. Link to comment https://forums.phpfreaks.com/topic/64092-date-formatting-question/#findComment-319428 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.