Right now, I am trying to compare a date pulled from an internal program to today's current date. I thought this would be a lot easier than it has been. I 'believe' the problem lies with the date being pulled internally is set as text.
My current code is:
Code: Select all
var1 = %A_Now% ; current date
FormatTime, var1, %var1%, MM/dd/yyyy ; set to just date, no time
Send, %var1%`r ; confirm output
Sleep, 50
var2 = %clipboard% ; pulls "text" date as 07/15/2018 as test
Sleep, 50
FormatTime, var2, %var2%, MM/dd/yyyy ; does not convert to format properly, if this line removed, "date" is an output, but then EnvSub does not work.
Send, %var2%`r ; confirm output
EnvSub, var1, %var2%, days ; expcted outcome to be 4 with current date
MsgBox, %var1% ; currently has blank output
My overall goal is to have an - if (datedifference > 40) {alternate route} - option within my current code. If there is a better/easier way to accomplish this, by all means, let me know.