Skip to content

Instantly share code, notes, and snippets.

@computer-tutor
Last active May 8, 2021 10:39
Show Gist options
  • Save computer-tutor/ed159d80ef51f483e503911d7b2d73fc to your computer and use it in GitHub Desktop.
Save computer-tutor/ed159d80ef51f483e503911d7b2d73fc to your computer and use it in GitHub Desktop.
MONTHS = ['January', 'February', 'Match', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December']
def date_convert(s):
y = s[:4]
m = int(s[5:-3])
d = s[8:]
month_name = MONTHS[m-1]
result= month_name + ' ' + d +' '+ y
return result
s = '2019/09/06'
r = date_convert(s)
print(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment