Emacs Time Stamp

When Was That?

If you want to enter today date and time, Emacs does not have an inbuilt function. Here's one that will do the job:

; Add date/time stamp to buffer
(defun insert-time()
(insert (format-time-string "%Y-%m-%d-%R")))

; Bind it to F8 key
(global-set-key (kbd "") 'insert-time)

Add these lines to your .emacs config file

Restart Emacs and press F8 for instant time stamp.

You can bind it to another key if your already using F8. Choose any key you like.

Hasta Luego!