Source Code:
(back to article)
from datetime import datetime # Hole das aktuelle Datum now = datetime.now() # Verwende strftime() um das Datum zu formatieren date_string = now.strftime("%Y-%m-%d") print(date_string) # Output: "2022-12-01"
Result:
Report an issue