I spent a whole day solving this task, because I did not know the datetime module, but I began to understand this module better)) Tips for those who can't: study datetime, or rather the methods "strptime", "strftime".