How to get formatted date time in Python the same way as in PHP
date('M d Y', $timestamp);
?
>>> import time
>>> timestamp = 1284375159
>>> time.strftime("%m %d %Y",time.localtime(timestamp))
'09 13 2010'
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