python pretty date print


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. print today.strftime('We are the %d, %b %Y')
  2. 'We are the 22, Nov 2008'
  3.  
  4. Eg in Django:
  5.  
  6. >>> k.updated_at.strftime('Last updated on %d, %b %Y, %H:%m')
  7. 'Last updated on 14, May 2013, 15:05'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.