I converted the SQLite string
WHERE strftime('%d%m', orders.created_at) = .......
directly to the MySQL monster:
WHERE CONCAT(CAST(DAY(orders.created_at) AS CHAR), LPAD(CAST(MONTH(orders.created_at) AS CHAR), 2, '0')) = .........
Please help me rewrite it to a shorter one.
source
share