gosu 0 Posted December 7, 2004 How to get the current timestamp with AutoIt? Cheers [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote] Share this post Link to post Share on other sites
Jos 2,165 Posted December 7, 2004 How to get the current timestamp with AutoIt?Cheers<{POST_SNAPBACK}>@HOUR @MIN @SEC SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
gosu 0 Posted December 7, 2004 @HOUR @MIN @SEC<{POST_SNAPBACK}>A timestamp is the seconds that have gone since the ?. ?. 1970. The date macros don´t help me.Thanks anyway. [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote] Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 7, 2004 A timestamp is the seconds that have gone since the ?. ?. 1970. The date macros don´t help me.Thanks anyway.<{POST_SNAPBACK}>Do what? What exactly are you wanting... what stands for ?. ?. 1970? I dont understand how that relates to a timestamp.JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
Jos 2,165 Posted December 7, 2004 (edited) A timestamp is the seconds that have gone since the ?. ?. 1970. The date macros don´t help me.Thanks anyway.<{POST_SNAPBACK}>Not sure if that is always the meaning of timestamp ... If you want the know the seconds elapsed since a given date/time then use the Datenew.au3 from my autoit3 stuff page and use command: _DateDiff("s", $sStartDate, $sEndDate) Edited December 7, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
sykes 0 Posted December 7, 2004 Like JdeB said: @HOUR @MIN @SECWill give you a timestamp You could place this in a variable also: $timestamp = @HOUR & ":" & @MIN & ":" & @SEC Maybe you're looking for something different? Please ... Elaborate We have enough youth. How about a fountain of SMART? Share this post Link to post Share on other sites
gosu 0 Posted December 7, 2004 (edited) Do what? What exactly are you wanting... what stands for ?. ?. 1970? I dont understand how that relates to a timestamp.JS<{POST_SNAPBACK}>I mean unix timestamps. I don´t really remember the correct date (LOL), but it was when unix was created.Not sure if that is always the meaning of timestamp ... If you want the know the seconds elapsed since a given date/time then use the Datenew.au3 from my autoit3 stuff page and use command: _DateDiff("s", $sStartDate, $sEndDate)<{POST_SNAPBACK}>Thank you, I will look for that file.Sry, I meant unix timestamp. In Germany, we just say timestamp to it. Edited December 7, 2004 by gosu [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote] Share this post Link to post Share on other sites
Valik 478 Posted December 7, 2004 (edited) He's looking for the number of seconds elapsed since the epoch commonly used for computers, January 1, 1970 00:00:00 (Midnight).Edit: Added time to the date. Edited December 7, 2004 by Valik Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 7, 2004 He's looking for the number of seconds elapsed since the epoch commonly used for computers, January 1, 1970 00:00:00 (Midnight).Edit: Added time to the date.<{POST_SNAPBACK}>Thanks Valik.That being the case...You can use the macros and just subtract the epoch from the timestamp.JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
Jos 2,165 Posted December 7, 2004 (edited) Thanks Valik.That being the case...You can use the macros and just subtract the epoch from the timestamp.JS<{POST_SNAPBACK}>You lost me.... how would you do that ??I know the _DateDiff() should be able to do it, but you make it sound like it is simple ... Edited December 7, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
Valik 478 Posted December 7, 2004 (edited) It is simple...#include <DateNew.au3> $EPOCH = "1970/01/01 00:00:00" $NOW = _NowCalc() $time = _DateDiff("s", $EPOCH, $NOW) MsgBox(4096, "", $time)Edit: Replaced macro use with _NowCalc() and added #include directive. Edited December 7, 2004 by Valik Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 7, 2004 That is correct. Though I probably wouldnt have done the so easy part of just using your DateDiff function as I generally like writing my own stuff Easy Smeazy Thanks Valik for spelling it out for us. JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
Jos 2,165 Posted December 7, 2004 @Valik, i knew how... just liked the way JS made it sound sooooo easy .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 7, 2004 (edited) @Valik, i knew how... just liked the way JS made it sound sooooo easy ....<{POST_SNAPBACK}>I tend to do that. JS Edited December 7, 2004 by JSThePatriot AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
Jos 2,165 Posted December 7, 2004 I tend to do that.JS<{POST_SNAPBACK}>I know.... But tryuing to keep an open mind to others when it really can be done in a simple way ... so thats why i said : Show me .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
Valik 478 Posted December 7, 2004 Most things are simple if you know what you're doing. 1 Xandy reacted to this Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 7, 2004 Most things are simple if you know what you're doing. <{POST_SNAPBACK}>haha... That will go into your quotes for sure.JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
JSThePatriot 18 Posted December 7, 2004 BTW, I am still working on the whole quotes deal. I cant wait till I get some more time. I think it will be big JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
sunrunner20 0 Posted June 7, 2006 Thread Revival. It seems that the sources used in this thread have long since died and I would like this functionality. Preferabbly in pure autoit(no dll calls or such) Share this post Link to post Share on other sites
dunno 0 Posted June 8, 2006 It is simple... #include <DateNew.au3> $EPOCH = "1970/01/01 00:00:00" $NOW = _NowCalc() $time = _DateDiff("s", $EPOCH, $NOW) MsgBox(4096, "", $time) Edit: Replaced macro use with _NowCalc() and added #include directive. That's great! But how can I "retranslate" a unix timestamp into two variable: $time (for the time) and $date (for the date)? Cheers Share this post Link to post Share on other sites