filmov
tv
Easy Python Datetime strftime() Example #shorts #python #pythonforbeginners

Показать описание
Using time stamps is important for loads of applications. It's often necessary to work with time stamps in the form of strings.
Datetime has a handy function called strftime() which converts a datetime object to a string. All you need to do is supply it with a a string which defines the format you want. The datetime format codes let you access whatever bit of information you need from the datetime object (e.g. the year or the hour and so on)
Datetime has a handy function called strftime() which converts a datetime object to a string. All you need to do is supply it with a a string which defines the format you want. The datetime format codes let you access whatever bit of information you need from the datetime object (e.g. the year or the hour and so on)