Skip to main content
TacTube
Search
بحث هذه المدونة الإلكترونية
=================================
Python - How to get current date time and format its output | DzQ39 |
This is a quick summary of how to get the current date and time and format its output in Python.
The Code
import datetime
print datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
The Result
Reference:
How to print date in a regular format in Python?
http://stackoverflow.com/questions/311627/how-to-print-date-in-a-regular-format-in-python
Comments
Newer Post
Older Post
Home
Comments
Post a Comment