To do this, simply put .LOG at the top of the text file in Notepad. Note that the word "LOG" has to be in all caps. Then, save and close the file. When it’s opened again, then Notepad will automatically add the date and time at the end of the file. You can then start typing any entries.
What’s also very nice is if you need to add the date/time to a file when it’s open, simply hit the F5 key. This will put the date and time at the current cursor position.
Microsoft has a KB article here: http://support.microsoft.com/kb/260563