Posts tagged format
Format datetime easily
- 21 December 2023
Formatting datetime is a common task in Python and could be a daunting task for those new to Python. Especially when you need to format datetime in a specific way and looking at the documentation can be daunting for some. The exampple below shows how to format datetime in a specific way with the time.strftime()
method what can be complicated with due to all the extra lines.