Code: Select all
CurrentYear = %A_Now%
EnvAdd, CurrentYear, 525600 , Minutes ;525600 mins = 1 year
FormatTime, NextYear,CurrentYear , yyyy
msgbox, %NextYear% ;why does this output the current year?
Code: Select all
CurrentYear = %A_Now%
EnvAdd, CurrentYear, 525600 , Minutes ;525600 mins = 1 year
FormatTime, NextYear,CurrentYear , yyyy
msgbox, %NextYear% ;why does this output the current year?
Code: Select all
; CurrentYear = %A_Now% ; traditional mode to assign a value to a variable
; or
CurrentYear := A_Now ; expressional mode
EnvAdd, CurrentYear, 525600, Minutes
FormatTime, NextYear, %CurrentYear%, yyyy
msgbox, %NextYear%
lmao this works!! dude i did the same thing and it didn't work, eh GGWPGEV wrote:Code: Select all
; CurrentYear = %A_Now% ; traditional mode to assign a value to a variable ; or CurrentYear := A_Now ; expressional mode EnvAdd, CurrentYear, 525600, Minutes FormatTime, NextYear, %CurrentYear%, yyyy msgbox, %NextYear%
Fails on 1st January of a leap year!bigdeal wrote:lmao this works!! dude i did the same thing and it didn't work, eh GGWPGEV wrote:Code: Select all
; CurrentYear = %A_Now% ; traditional mode to assign a value to a variable ; or CurrentYear := A_Now ; expressional mode EnvAdd, CurrentYear, 525600, Minutes FormatTime, NextYear, %CurrentYear%, yyyy msgbox, %NextYear%
Code: Select all
CurrentYear = %A_Now%
EnvAdd, CurrentYear, 525600 , Minutes ;525600 mins = 1 year
FormatTime, NextYear, % CurrentYear, yyyy
msgbox, %NextYear% ;why does this output the current year?
Code: Select all
FormatTime, NextYear, %CurrentYear%, yyyy
Code: Select all
NextYear := A_YYYY + 1
MsgBox % NextYear
Users browsing this forum: bobstoner289, Google [Bot], peter_ahk, Spawnova and 347 guests