I've got a date in the format day=30, month=11, year=2014. How can I use python to return this in a worded format? Example Sunday 30th November 2014. I can't find any datetime format that this works for...
You can use the following format for strftime:
In [1]: from datetime import date
In [2]: date(day=30, month=11, year=2014).strftime('%A %d %B %Y')
Out[2]: 'Sunday 30 November 2014'
Adding the proper suffix to the day number is more complicated:
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