bradkenyon Posted September 12, 2008 Share Posted September 12, 2008 stupid me entered dates into the table poorly. here is a screen shot of how they are entered. YYYY-MM-DD HH:MM:SS When it should be YYYYMMDDHHMMSS How could I go about running a query to change them appropriately in the table? Thanks in advance. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 12, 2008 Share Posted September 12, 2008 The format is correct for a DATETIME data type and does not need to be changed. What problem are you having? Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/#findComment-639790 Share on other sites More sharing options...
bradkenyon Posted September 12, 2008 Author Share Posted September 12, 2008 I thought the proper format that is wise to use is YYYYMMDDHHMMSS? I just want to make sure I am being the most efficient? Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/#findComment-639792 Share on other sites More sharing options...
PFMaBiSmAd Posted September 12, 2008 Share Posted September 12, 2008 What data type are your columns? You can provide either a YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS value and it will be uses as YYYY-MM-DD HH:MM:SS in a DATETIME data type. Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/#findComment-639798 Share on other sites More sharing options...
bradkenyon Posted September 12, 2008 Author Share Posted September 12, 2008 It is datetime. So its alright to leave as is? I just want to be sure I am following proper guidelines, so it doesn't bite me in the butt later on. Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/#findComment-639800 Share on other sites More sharing options...
PFMaBiSmAd Posted September 12, 2008 Share Posted September 12, 2008 http://dev.mysql.com/doc/refman/5.0/en/datetime.html Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/#findComment-639850 Share on other sites More sharing options...
revraz Posted September 12, 2008 Share Posted September 12, 2008 Yes, they are fine as they are. Link to comment https://forums.phpfreaks.com/topic/123940-solved-need-help-reformatting-data-in-date-column-in-table/#findComment-639987 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.