; Unix timestamp (for example, 1652602245, which represents 2022-05-15 08:10:45) UnixTimestamp := 1652602245 ; Convert Unix timestamp to milliseconds (AutoHotkey uses milliseconds, Unix timestamps are in seconds) Milliseconds := UnixTimestamp * 1000 ; Set the epoch date to "1970-01-01 00:00:00" Epoch := "19700101000000" ; Add the milliseconds to the epoch EnvAdd, Epoch, %Milliseconds%, Milliseconds ; Format the date into human-readable form FormatTime, HumanDate, %Epoch%, yyyy-MM-dd HH:mm:ss MsgBox, Unix Timestamp: %UnixTimestamp%`nConverted Date: %HumanDate%
EnvAdd
FormatTime
A_Now
YYYYMMDDHH24MISS
MsgBox % A_Now
A_NowUTC
MsgBox % A_NowUTC
FormatTime, OutputVar, %A_Now%, yyyy-MM-dd HH:mm:ss
EnvAdd, A_Now, 5, Days
EnvSub
EnvSub, A_Now, 2, Hours
FileSetTime
FileSetTime, %A_Now%, "example.txt"
FileGetTime
FileGetTime, OutputVar, "example.txt"
OutputVar
A_TickCount
MsgBox % A_TickCount
SetTimer
SetTimer, MyTimerLabel, 1000
Sleep
Sleep, 5000