Jump to content
Macro Express Forums

Recommended Posts

Posted

Hi All!

 

I am trying to figure out the running times of my macros- specifically, a way to capture the start time and end time- and the subsequent data manipulation, or formulas, for adding up the total time a macro was being run during the day.

 

Is there a command in ME that allows me to capture this at least?

 

Thanks!

Posted

Yes, under the text category there is a date/time command. You can use it to log the times to a file or what have you. There is also a datestamp in the debug command. And as long as the macro isn't running for more than a day the time calculations are fairly simple. However there are some pre-written routines for time calculations. Someone made a list of them here just about a week ago, you might check there if you need something more sophisticated. BTW, in the Date/time time command you can save just one component of the time like hour (h) so you don't have to parse it out later. So let's say you save the hour (24 clock), minute and seconds. in T1-3. Now convert to integer N1-3 and multiply N1*3600, N2*60, and then sum N1-3. Then just subtract the stop from start values and you have the running seconds.

Posted

Thanks!

 

For some reason, mm won't work. ss and hh do, and when I put mm:ss together, mm does not display properly (displayed 02 when should be 49)

 

However, putting them all together, hh:mm:ss, works just fine. I will just chop up a variable with all of them in it rather than try to figure out the program issue!

 

Thanks!

Posted

Ha ha ha! Because mm should be 02 since mm is the month date code. Try "n" instead. And look closely, it's probably NN in your final example.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...