Stop Watch string object
set StopWatchObj1 = histuils.stopwatch
I need to store this in a excel sheet so I use the function aqtime.writetotextfile to write it in a .csv file which I can open in excel.
The resut of stopwatchobj1.tostring in the .csv file when I open as text file shows the right string "0:00:02:690".
When I open the same in excel, I see the result as 00:00:2
Is there a way I can get the same format in excel??
TC has output, then you can change the cell formatting in Excel by going
to Format -> Format Cells... (keyboard shortcut "Ctrl + 1"). On the "Number" tab choose the "Custom" option, and then on the right in the "Type" textbox enter:
Then click OK and it should appear correctly on the spreadsheet.
I have to give my scripts to my client.. when they view the result sheet they should be able to get it.
Thanks for your replly...
1) Preceed the value with a single quote to force it to be interpreted as a string, as follows:
2) Change the last colon to a decimal point and it should be interpreted as a time, as follows:
Please note that this forum is actually for AutomatedQA TestComplete functionality questions, not for questions on Microsoft Excel.
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
I understand this forum is not for excel. My question is totally related to the output from HISUtils stopwatch object
I tried the aqdatetime.Timeinterval to fnd out the difference between the two results i get from stopwatch. Looks like i need to have date format as well to use the timeinterval method. Do you have any suggestion to calculate the difference
The output from stopwatch object.tostring is in the format hh:mm:ss.000
var stopWatch = HISUtils.StopWatch;
var startTime = stopWatch.Split();
var endTime = stopWatch.Stop();
Log.Message("Start time: " + startTime + "ms");
Log.Message("End time: " + endTime + "ms");
Log.Message("Duration: " + (endTime - startTime) + "ms");