Formatting date strings in Python


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

[date](http://docs.python.org/library/datetime.html#datetime.date), [datetime](http://docs.python.org/library/datetime.html#datetime.datetime) and [time](http://docs.python.org/library/datetime.html#datetime.time) objects in Python have a [strftime](http://docs.python.org/library/datetime.html#strftime-behavior) method for creating string representations in whatever format you want. (See the strftime link for the strftime syntax.)

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.