today = str(date.today())
now = datetime.now()
print(now)
my_datetime = datetime.strptime(today+ ' 10:30AM', '%Y-%m-%d %I:%M%p')
print(my_datetime)
if (now > my_datetime):
print("Hello")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter