Computer Science, asked by GunjanVedi5261, 1 year ago

How to subtract Python timedelta from date in Python?

Answers

Answered by ayushjaa
0

there are many websites which helps you

Answered by prasadkolhatkar17
0

Answer:

from pandas.tseries.offsets import Day

import datetime

#get time delta

time_delta = Day(5)

print("time delta: ", time_delta)

curr_time = datetime.datetime.now()

print("Current Time:", curr_time )

print("Extracting time delta from current time:", curr_time - time_delta)

Explanation:

I have used pandas library for extracting time delta from time.

Similar questions