- use datetime.now() to retrieve current date and time
- from datetime import datetime
- now = datetime.now()
- print now
- or print now.month
- to print in mm/dd/yyyy format
- print '%s/%s/%s' % (now.month, now.day, now.year)
- print '%s:%s:%s' % (now.hour, now.minute, now.second)
nov 28 2014 ∞
apr 19 2015 +