Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often find myself typing the current date and time on several documents, forms, etc.

Is there any lightweight application that would allow me to automatically insert (or copy to the clipboard) the current date and time (in alphabetical form, if possible) using just a simple keyboard shortcut? I'm interested in solutions for Windows.

share|improve this question
up vote 3 down vote accepted

You could do it using AutoHotkey.

An example from the AutoHotkey documentation:

:*:]d::  ; This hotstring replaces "]d" with the current date and time via the commands below.
FormatTime, CurrentDateTime,, M/d/yyyy h:mm tt  ; It will look like 9/1/2005 3:53 PM
SendInput %CurrentDateTime%

An example from the AutoHotkey forum: Input system date and/or time, when u press a hot key:

SetTitleMatchMode, 2
IfWinActive, Notepad
FormatTime, xx,, ddMMMyy ; This is one type of the date format
FormatTime, zz,, hh:mm:ss tt ; This is one type of the time format
SendInput, %xx%{Enter}
SendInput, %zz%

See FormatTime for a list of the available date formats.

To set it up:

  1. Download and install AutoHotkey_L, let it associate with .ahk files
  2. Copy either of the above examples, paste in into Notepad, and save somewhere with an .ahk extension, e.g. My Documents/keys.ahk
  3. Navigate to the file you saved and double click it
  4. Add the .ahk script to your Startup folder
share|improve this answer
Thanks! I'm not very familiar with AutoHotkey, but I'll look into it. From the top of your head, is there any easy way to change the code above to print the month in alphabetical form ? e.g. February 2nd, 7:04pm – Amelio Vazquez-Reina Feb 3 '11 at 0:05
MMM for short month or MMMM for full month. See – Mikel Feb 3 '11 at 0:18

Short of just copying and pasting it to your documents, there is a feature to do that on Microsoft Word.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .