LMSouq
database Open

MySQL date format DD/MM/YYYY select query?

BA
basickarl
1 month ago
3 views
Problem Description
I'm a bit confused on how to order by date formats. For the format `YYYY-MM-DD` you would do this: `...ORDER BY date DESC...` How would you order by `DD/MM/YYYY`? This isn't working: SELECT * FROM $table ORDER BY DATE_FORMAT(Date, '%Y%m%d') DESC LIMIT 14

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base