Skip to content

Instantly share code, notes, and snippets.

@fatosmorina
Created April 27, 2021 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatosmorina/bbdff531625fc7b90177b3026de5b263 to your computer and use it in GitHub Desktop.
Save fatosmorina/bbdff531625fc7b90177b3026de5b263 to your computer and use it in GitHub Desktop.
from datetime import datetime
date = '04.27.2021'
result = datetime.strptime(date, "%m.%d.%Y").strftime("%d.%m.%Y")
print(result) # 27.04.2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment