Python 3 Pandas Library Script to Get the Current Date Time in Days,Months,Years,Hours,Minutes and Seconds Full Project For Beginners

Python 3 Pandas Library Script to Get the Current Date Time in Days,Months,Years,Hours,Minutes and Seconds Full Project For Beginners

 

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

 

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

 

Leave a Reply