# Datetime Library ## `import datetime` `datetime` is a class object, so to use the functions within this library, we have to user `datetime.[function you want to use]` before the function call ### Some useful date time uses `datetime.now()` This returns you the current time `datetime.datetime()` This can have the attributes year, month, day, hour minute, second, microsecond and tzinfo - allows you to print out a combination of date and time `datetime.utcnow()` This returns the current UTC date and time It returns the current UTC date and time as a naive date time object `datetime.strptime(date_string, format)` This returns a date time object corresponding to date_string, according to the format given `timedelta.total_seconds()` This returns the total number of seconds contained in the duration (not sure if this would be useful just looking at the doc of function calls to see what might be) `date.today()` This returns the current local date `date.fromisformat(date_string)` Returns a date corresponding to the format given in the date string `date.ctime()` Returns a string representing the date