Skip to content

Instantly share code, notes, and snippets.

@lukescammell
Created January 1, 2018 15:33
Show Gist options
  • Save lukescammell/11bcd0acf4c6f2fa3648aa697b00719a to your computer and use it in GitHub Desktop.
Save lukescammell/11bcd0acf4c6f2fa3648aa697b00719a to your computer and use it in GitHub Desktop.
Ctrl+Win+Alt+d to insert the current date and time.
;-------------------------------------------------------------------------------
; Insert date and time
;-------------------------------------------------------------------------------
; http://prxbx.com/forums/showthread.php?tid=1181&pid=10647#pid10647
; LS 2010-04-27 10:20:23
; modified to use "GMT" instead of "UTC" since GMT respects British Summer Time!
; changed %A_NowUTC% to %A_NowGMT%
; LS 2013-11-27 09:32:50
; perhaps %A_Now% just uses system time which would respect any daylight savings no matter where you are?
^#!d::
FormatTime, Today, %A_Now%, yyyy-MM-dd HH:mm:ss
Send, %Today%
return
^!+d::
FormatTime, Today, %A_Now%, yyyy-MM-dd_HH-mm-ss
Send, %Today%
return
::|date:: ;Insert current date
FormatTime, T, %A_Now%, yyyy-MM-dd ; 2011-07-25
SendInput %T%
return
::|time:: ;Insert current time
FormatTime, T, %A_Now%, HH:mm:ss ; 09:24:20AM
SendInput %T%
return
;------------------------------------------------------------------------------/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment