I am trying to print only the month and date in python as following :
09-December
08-October
How could I do that?
I am trying to print only the month and date in python as following :
09-December
08-October
How could I do that?
from datetime import datetime
dt = datetime.strptime("09/12/16", "%d/%m/%y")
dt.strftime("%d-%B")
from datetime import date
d = date(2016, 12, 9)
d.strftime("%d - %A")
# 9 - Friday
# month day year
#d.strftime("%A %d %B %Y")