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:
- Download and install AutoHotkey_L, let it associate with .ahk files
- Copy either of the above examples, paste in into Notepad, and save somewhere with an
.ahk extension, e.g. My Documents/keys.ahk
- Navigate to the file you saved and double click it
- Add the .ahk script to your Startup folder