🐘

PHP YYYY-MM-DD

Output: 2025-01-15
Hurtig Reference
Format Streng
Y-m-d
Output
2025-01-15

Formater dato som YYYY-MM-DD i PHP

🐘 PHP
<?php echo date('Y-m-d'); // Output: 2025-12-31

PHP datoformat koder

Kode Betydning Eksempel
d Day (01-31) 31
j Day (1-31) 31
m Month (01-12) 12
n Month (1-12) 12
Y Year (4 digits) 2025
y Year (2 digits) 25
M Abbreviated month Dec
F Full month December

Andre formater i PHP

YYYY-MM-DD i andre sprog

Officiel Dokumentation

For mere information om datoformatering i PHP, se den officielle dokumentation:

PHP dato dokumentation →

Relaterede Sider