bit of an issue, I have a database that is already populated one of the columns is a varchar but storing dates DD/MM/YY
is there a way to change this the date all at once and change the format to the correct formatting 0000-00-00
thanks
change varchar to DATE in PHPMyAdmin
Moderator: General Moderators
-
jonnyfortis
- Forum Contributor
- Posts: 462
- Joined: Tue Jan 10, 2012 6:05 am
Re: change varchar to DATE in PHPMyAdmin
Backup your table beforehand.
Or DATETIME if that's what you need.
Code: Select all
ALTER TABLE foo MODIFY somecolumn DATE-
jonnyfortis
- Forum Contributor
- Posts: 462
- Joined: Tue Jan 10, 2012 6:05 am
Re: change varchar to DATE in PHPMyAdmin
great thanksCelauran wrote:Backup your table beforehand.
Or DATETIME if that's what you need.Code: Select all
ALTER TABLE foo MODIFY somecolumn DATE