import datetime
Datetime
'%Y%m%d_%H%M%S') datetime.datetime.now().strftime(
'20230119_112149'
'%Y_%m_%d') datetime.datetime.now().strftime(
'2023_01_19'
def get_elapsed_days(b):
= datetime.datetime.now()
a return (a-b).days
= datetime.datetime(2018, 1, 10, 14, 37)
b print(get_elapsed_days(b))
1845