Mysql varchar date and timeseries

I changed it to:

select UNIX_TIMESTAMP(STR_TO_DATE(order_date,"%Y-%m-%d")) as time_sec,
sum(record) as value,
record as metric
FROM Table
where UNIX_TIMESTAMP(STR_TO_DATE(order_date,"%Y-%m-%d") BETWEEN __timeFrom() AND __timeTo()

Still shows no data points.