help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting date


From: B. T. Raven
Subject: Re: Inserting date
Date: Sat, 28 Feb 2009 21:38:10 -0600
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Armando Martins wrote:
Hello!

Can you tell me how can I insert the today's date in a text file,
please? (something like fields in traditional word processors).

Thanks
Armando Martins



If you evaluate this:

(global-set-key "\C-cid" (lambda() (interactive) (insert (format-time-string "%a %Y-%m-%d - %l:%M %p"))))

then you can use that key combo to insert day date - time. Strip out some of the formating specs if you don't need them or change their order if you like.

Ed


reply via email to

[Prev in Thread] Current Thread [Next in Thread]