Rick
Rick

Reputation: 2308

Mysql: Date as string

I have a field in MySQL as varchar and need to do a select with a range. The date is in the following format "%m/%d/%Y" (Ej. 10/14/2010).

Upvotes: 1

Views: 401

Answers (1)

Trevor
Trevor

Reputation: 6689

Use str_to_date

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

Upvotes: 2

Related Questions