🐘
PostgreSQL YYYY-MM-DD
Output: 2025-01-15
Referensi Cepat
String Format
YYYY-MM-DD
Output
2025-01-15
Format tanggal sebagai YYYY-MM-DD di PostgreSQL
🐘 PostgreSQL
SELECT TO_CHAR(NOW(), 'YYYY-MM-DD') AS formatted_date;
-- Output: 2025-12-31Kode format tanggal PostgreSQL
| Kode | Arti | Contoh |
|---|---|---|
| DD | Day of month (01-31) | 31 |
| MM | Month (01-12) | 12 |
| YYYY | Year (4 digits) | 2025 |
| YY | Year (2 digits) | 25 |
| Mon | Abbreviated month | Dec |
| Month | Full month name | December |
Format lainnya di PostgreSQL
YYYY-MM-DD di bahasa lain
Dokumentasi Resmi
Untuk informasi lebih lanjut tentang pemformatan tanggal di PostgreSQL, lihat dokumentasi resmi: