; Random date (for example, 2022-05-15 08:10:45) RandomDate := "20220515083045" ; Set the epoch date to "1970-01-01 00:00:00" Epoch := "19700101000000" ; Calculate the difference in seconds between the random date and the epoch EnvSub, RandomDate, %Epoch%, Seconds ; Convert the difference into a Unix timestamp (which is in seconds) UnixTimestamp := RandomDate ; Display only the Unix Timestamp in the message box MsgBox, Unix Timestamp: %UnixTimestamp%
EnvSub
A_Now
YYYYMMDDHH24MISS
MsgBox % A_Now
A_NowUTC
MsgBox % A_NowUTC
FormatTime
FormatTime, OutputVar, %A_Now%, yyyy-MM-dd HH:mm:ss
EnvAdd
EnvAdd, A_Now, 5, Days
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