How do I write this pseudocode in Python? With 'created_date' being a datetime object.
if (created_date + 30days) < now:
print 'valid'
else:
print 'expired'
import datetime as DT
if (created_date + DT.timedelta(days=30)) < DT.datetime.now():
print('valid')
else:
print('expired')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With