How can I insert current date and time into a file using Emacs?

Ray picture Ray · Oct 30, 2008 · Viewed 33.9k times · Source

What commands in Emacs can I use to insert into the text buffer of a file the current date and time?

(For example, the equivalent in Notepad is simply pressing F5 which is about the only useful feature for Notepad!)

Answer

eclecticx picture eclecticx · Nov 9, 2008
C-u M-! date