Why would it work only with the same washing-program? Lets say your washing machine draws approximately 1000 W while washing. After washing is finished, it drops to, let say 10 W - LED indicators and similar stand-by stuff still draw some power. That will allow you to change the state to finished, but, also, allow you to write date and time (exact date and time when power dropped below, lets say 20 W). It is not connected to a program, but to a power usage. You could firstly test power usage when machine is on stand-by, and then use that value as indicator of changed state - which will then trigger writing of date and time too.
Edit: Maybe I misunderstood your initial post. Did you mean "When it's finished" or "When will it finish"?