Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: How to Format Dates and Times

Python: How to Format Dates and Times
{filelink=16767}

import time
now = time.localtime(time.time())
print time.asctime(now)
print time.strftime("%y/%m/%d %H:%M", now)
print time.strftime("%c", now)
print time.strftime("%a %b %d", now)
print time.strftime("%d", now)
print time.strftime("%I %p", now)
print time.strftime("%Y-%m-%d %H:%M:%S %Z", now)

Users who found this page were searching for:

  • time.asctime() date difference python
  • time asctime format
  • python time.asctime() format
  • time.asctime format
  • python format time locale french
  • dateformatter format python now()

No comments yet.

Leave a Comment