Tag Archives: datetime

Introduction To datetime module in python – Python Dev Feed

Introduction To datetime module in python datetime module datetime: is a built-in module used for handling, processing and manupilating time & dates in python. intoduction to datetime module import datetime today = datetime.date.today() print(today) # 2021-09-13 print(f'{today.day}/{today.month}/{today.year}’) # 13/09/2021 now = datetime.datetime.now() print(now) # 2021-09-13 23:42:32.583940 # specific format print(now.strftime(“%m/%d,%Y. %H:%M-%S”)) # 09/13,2021. 23:42-32 print(now.strftime(“%b,…

Read More