Welcome folks today in this blog post we will be getting current time
in python using the pandas
library. All the full source code of the application is given below.
Get Started
In order to get started you need to install the following library by typing the below command as shown below
pip install pandas
After installing this library you need to make an app.py
file and copy paste the following code
app.py
1 2 3 4 5 6 7 8 9 10 |
import pandas as pd print(pd.datetime.now()) print(pd.datetime.now().date()) print(pd.datetime.now().year) print(pd.datetime.now().month) print(pd.datetime.now().day) print(pd.datetime.now().hour) print(pd.datetime.now().minute) print(pd.datetime.now().second) print(pd.datetime.now().microsecond) |
Now if you execute the python
script by typing the below command as shown below
python app.py