[Top][All Lists]

[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 (Windows/20081209)

Armando Martins wrote:

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

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.


reply via email to

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