import time # get current time date_time = time.strftime("%b %d, %Y %-I%p") #the above outputs: May 27, 2021 7PM