I have this code :
>>> import datetime
>>> l = '2011-12-02'
>>> t = datetime.datetime.strptime(l, '%Y-%m-%d')
>>> print t
2011-12-02 00:00:00
my question is, it is possible that only the 2011-12-02
will be printed?
>>> t.strftime('%Y-%m-%d')
'2011-12-02'
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