Skip to content

Instantly share code, notes, and snippets.

@ymdx
Created December 13, 2017 11:04
Show Gist options
  • Save ymdx/96c3099350a8b3535d4c14e80e7134bd to your computer and use it in GitHub Desktop.
Save ymdx/96c3099350a8b3535d4c14e80e7134bd to your computer and use it in GitHub Desktop.
Function to format a date string (%d/%m/%Y') to (%Y-%m-%d') on Python
def format_date(param):
array = []
aux = param.split("/")
for i in reversed(aux):
array.append(i)
return "-".join(array)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment