🐬
MySQL YYYY-MM-DD
Dalje: 2025-01-15
Referencë e Shpejtë
String Formati
%Y-%m-%d
Dalje
2025-01-15
Formatimi i datës si YYYY-MM-DD në MySQL
🐬 MySQL
SELECT DATE_FORMAT(NOW(), '%Y-%m-%d') AS formatted_date;
-- Output: 2025-12-31Analizimi i stringut të datës
🐬 MySQL (Analizim)
SELECT STR_TO_DATE('2025-12-31', '%Y-%m-%d') AS parsed_date;
-- Output: 2025-12-31Kodet e formatit të datës MySQL
| Kod | Kuptim | Shembull |
|---|---|---|
| %d | Day of month (01-31) | 31 |
| %e | Day of month (1-31) | 31 |
| %m | Month (01-12) | 12 |
| %c | Month (1-12) | 12 |
| %Y | Year (4 digits) | 2025 |
| %y | Year (2 digits) | 25 |
| %b | Abbreviated month | Dec |
| %M | Full month name | December |
Formate të tjera në MySQL
YYYY-MM-DD në gjuhë të tjera
Dokumentacioni Zyrtar
Për më shumë informacion rreth formatimit të datës në MySQL, shikoni dokumentacionin zyrtar: