Kogmedia Posted May 1, 2007 Share Posted May 1, 2007 Does auto it work with unix time? or if not does any one know how to covert it to a real date/time. Thanks, Keith [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
sandman Posted May 1, 2007 Share Posted May 1, 2007 I don't know if it does, but here's some logic for converting it (UNIX time = military time right? if not, dont be mad please ) If $time > 12 Then $newtime = $time =- 12 & " PM" [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 1, 2007 Share Posted May 1, 2007 (edited) No. Windows must have ctime functions available somewhere, but I don't know how you find them. Someone may have a UDF out that a quickie-search didn't find, but the native AutoIt functions don't do unix time.Definition: Unix Time (Wikipedia)P.S. I did come across an interesting VBScript example: VBScript Date-Time Conversions Class Edited May 1, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Kogmedia Posted May 1, 2007 Author Share Posted May 1, 2007 (edited) I found this excel formula in one of my old doc I will give it a try =UnixTime / 86400 + 25569 If $time > 12 Then $newtime = $time =- 12 & " PM" Will convert 24hour time into 12 AM/PM Unix time is 1165754109000, standard unix time - ie milliseconds since Jan 1 1970. Edited May 1, 2007 by Kogmedia [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
sandman Posted May 1, 2007 Share Posted May 1, 2007 Okay, sorry.. I didn't have any idea what UNIX time was, so I guessed :"> [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Kogmedia Posted May 1, 2007 Author Share Posted May 1, 2007 (edited) Never mind Sandman its better to try than not try at all I will give the vbscript ago but ~ might be better to forget unix time all together $unix = 1176755972 $new = $unix / 86400 + 25569 MsgBox(0,"Real Date/Time", $new) Gave me 39188.860787037 now to make that a date/time Edited May 1, 2007 by Kogmedia [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
Kogmedia Posted May 1, 2007 Author Share Posted May 1, 2007 I found this but not total sure how to use it #include <Date.au3> ; Calculated the number of seconds since EPOCH (1970/01/01 00:00:00) $iDateCalc = _DateDiff( 's',"1970/01/01 00:00:00",_NowCalc()) MsgBox( 4096, "", "Number of seconds since EPOCH: " & $iDateCalc ) [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now