Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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%
return

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

$F12::
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%
}
Return

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 –  user815423426 Feb 3 '11 at 0:05
1  
MMM for short month or MMMM for full month. See autohotkey.com/docs/commands/FormatTime.htm –  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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.