InsectGrain 0 Posted July 19, 2010 Hello, In my script, i need to compare 2 or more date/times... the newest will be highlighted in the gui... I have looked through the forum and i have only founded on how to compare 2 files like using "_Date_Time_CompareFileTime". Please help Share this post Link to post Share on other sites
evilertoaster 3 Posted July 19, 2010 What format are your date/times in? There are several conversion options within the Date.au3 UDF, but it depends what your initial format is. Share this post Link to post Share on other sites
InsectGrain 0 Posted July 20, 2010 ; add Date $Time = FileGetTime($sLine, 0, 0) $Month = $Time[1] $Day = $Time[2] $Year = $Time[0] $Hour = $Time[3] $Minutes = $Time[4] GUICtrlSetData($List2, " <-----Date modified: " & $Month & "/" & $Day & "/" & $Year & " at: " & $Hour & ":" & $Minutes, 1) EndIf I'm not sure what you mean by format.... Share this post Link to post Share on other sites
JohnOne 1,603 Posted July 20, 2010 Can you not use the macros @Hour, @Min etc...? $a = @SEC Sleep(1000) $b = @SEC If $b > $a Then MsgBox(0,"","$b is newer") AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
InsectGrain 0 Posted July 20, 2010 Can you not use the macros @Hour, @Min etc...? $a = @SEC Sleep(1000) $b = @SEC If $b > $a Then MsgBox(0,"","$b is newer") I don't understand, why would I need the system time? Share this post Link to post Share on other sites
JohnOne 1,603 Posted July 20, 2010 I dont know. Just had a moment. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
czardas 1,269 Posted July 20, 2010 (edited) When you say the newest, do you mean the most recently created or modified? Sorry I see from your example you mean modified. You can concatonate the array elements like this. $lastMod = $time[0] & $time[1] & $time[2] & $time[3] & $time[4] & $time[5] Then the largest nmber will be the most recent. Or you can set the format to 1 which does the same thing. Edited July 20, 2010 by czardas operator64 ArrayWorkshop Share this post Link to post Share on other sites