🐍

Python MM/DD/YYYY

Output: 01/15/2025
Snelle Referentie
Formaat String
%m/%d/%Y
Output
01/15/2025

Datum formatteren als MM/DD/YYYY in Python

🐍 Python
from datetime import datetime date = datetime.now() formatted = date.strftime('%m/%d/%Y') print(formatted) # Output: 12/31/2025

Python datumformaatcodes

Code Betekenis Voorbeeld
%d Day of month (01-31) 31
%m Month (01-12) 12
%Y Year with century 2025
%y Year without century (00-99) 25
%b Abbreviated month name Dec
%B Full month name December
%a Abbreviated weekday Wed
%A Full weekday name Wednesday

Andere formaten in Python

MM/DD/YYYY in andere talen

Officiële Documentatie

Voor meer informatie over datumformattering in Python, zie de officiële documentatie:

Python datumdocumentatie →

Gerelateerde Pagina's