开发者

Mysql: Date as string

开发者 https://www.devze.com 2023-01-19 20:44 出处:网络
I have a field in MySQL as varc开发者_C百科har and need to do a select with a range. The date is in the following format \"%m/%d/%Y\" (Ej. 10/14/2010).Use str_to_date

I have a field in MySQL as varc开发者_C百科har and need to do a select with a range. The date is in the following format "%m/%d/%Y" (Ej. 10/14/2010).


Use str_to_date

SELECT STR_TO_DATE(dateColumnName,'%m/%d/%Y');
0

精彩评论

暂无评论...
验证码 换一张
取 消