Created
December 13, 2017 11:04
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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