Make a simple invisible form to run at startup, that will close on attempt to shutdown
Paste this into the form_unload event:


open filename for append as #1
print #1, now
close #1

And set the filename to the filepath where you want the dates to be stored.

Good luck!