A Date Stamp

with AutoHotkey

by Philippe Lamarre
last updated June 4, 2014
difficulty.png Easy

by Philippe Lamarre


Are you tired of manually entering a date formula into each of your Microsoft Excel worksheets or having to press three keystrokes to have a date stamp in Microsoft Word that will change when you reopen your file later? If you use the date stamp often, in any program, you will save a lot of time with this script.

When you stop working to look for the date and time on your cell phone, your watch or at the corner of your computer screen and transcribe it in your current file, it distracts you from your ideas and disrupts your workflow. If you have to remember a different macro for every program to get the date stamp, it is not the best way to be effective.

This is a simple script that works with every programs and you will be happy you have it even if you only use it once in a while. There are a lot of ways that you can adapt it. You will find out more informations in the sections below on how you can personalize the script.



overlay-um-date.gifPrepare your overlay
Choose an unassigned key on the Enterpad to use your date stamp.
Name it something appropriate. This example uses DATE.


Code installation

Copy/paste the following script in your AutoHotkey script template (Enterpad.ahk) at the chosen key location.

SendInput %A_YYYY% %A_MMM% %A_DD%

More Info

The AutoHotkey documentation provides different ways to personalize the date stamp script. You will find out more details by clicking the following link :  


You may want to use the following command to have a time stamp that can complement the date stamp script :

SendInput %A_Hour%:%A_Min%:%A_Sec%

Also, usually the SendInput command will send text only and you would read A_Hour:A_Min:A_Sec when you press your key. But because there are percent signs, it refers to a variable. In this case, the variables are the hour, minutes and seconds.