I am trying to print only the month and date in python as following :
09-December
08-October
How could I do that?
Try this
import datetime
now = datetime.datetime.now()
print now.strftime("%d-%B")
For more information on this : strftime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With