'Im using python to insert into an SQL database, using datetime I've got my date but now I'm wanting to increase the date
the problem im having is using this code ive increase the date 2 years but the formattings wrong and i want to use this to to compare to my actual date but i have no idea how
today = datetime.now()
date_time = today.strftime("%m/%d/%Y")
future_date_after_2yrs = today + timedelta(days = 730)
date_time_new = future_date_after_2yrs.strftime("%m/%d/%Y")
from my database this is how it looks
25 02/11/2022
26 02/11/2022
27 2024-02-11 10:55:19.612941
how would i be able to increase my year by 2 but still keep the way its shown as entry 25 and 26
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
