Search
To replace any value like a year, month, date, hour, etc within the date or time in the datetime object we can use the replace() method.
datetime
replace()