-2

How do I add 3 days to the dates from a list of dates in Python? For example, given the following dates...

2018-6-12 00:11:09

2018-5-14 15:04:13

2018-9-10 00:14:40

...the output should be:

2018-6-15 00:11:09

2018-5-17 15:04:13

2018-9-13 00:14:40

Any suggestions on how to do this in Python? Thanks in advance.

Yadhu
  • 125
  • 10
  • 3
    Possible duplicate of [Adding 5 days to a date in Python](https://stackoverflow.com/questions/6871016/adding-5-days-to-a-date-in-python) – Kamil Niski Oct 24 '18 at 06:12

1 Answers1

0

Got the solution

start_date = pd.to_datetime(data.Dateid)

end_date = start_date + timedelta(days = 3)

Yadhu
  • 125
  • 10