mysql - convert one specific query from text field to date for arithmetic functions -


i have thoroughly searched have been thoroughly confused @ how convert returned sql query fields. i've found how convert whole column text field date not specific query. i'm not sure how update, set, etc. imported csv file of names , ates, , query (in phpmyadmin) returns desired text field this:

select meta_value `drabble_postmeta` meta_key = 'date_paid' 

this returns 130 fields need convert pure text field uniformly using mm/dd/yyyy (ie 11/2/2010) format using "date" field can sort date_paid.

one meta_value has text field "11/2/2010". meta_value longtext. don't know if want use operator because i'll need read other meta_value fields id of columns == id of found date_paid.

use str_to_date function.

select str_to_date(meta_value,'%m/%d/%y') date_paid     `drabble_postmeta`      meta_key = 'date_paid' 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -