Link to home
Start Free TrialLog in
Avatar of CityInfoSys
CityInfoSysFlag for United States of America

asked on

Convert Mysql varchar (10) dd/mm/yyyy to varchar (10) YYYY-MM-DD format

Our database contains a table called accountinfo with a column called fields_4 the current format is this:
3/15/2012      
3/16/2012      
3/17/2012      
3/18/2012      

This is what we would like to have.
2012-03-15      
2012-03-16      
2012-03-17      
2012-03-18      
We need to keep the format in varchar for scripting reasons not date format.

I was thinking something like this
Set Date_Field = Convert(datetime, VarChar_Field, 101) .
Thanks
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CityInfoSys

ASKER

Thanks for taking the time to show the example.