malj67
16 years agoOccasional Contributor
Converting Log Date Format
I am developing a custom test type (in VB6) for Quality Center using TestComplete. I need to report test results to Quality Center. I could do this in two ways. I could report the results after each step (from within TestComplete script) or I could parse the log after the test has finished (outside of TestComplete, in VB6).
Since there is no way to catch and handle exceptions in VBScript, which is the language we use in TestComplete, and report this as an error to Quality Center, I would instead like to report results after the test has finished.
I now have a problem. I am not able to convert the "date" properties from the log items to anything useful. When I parse the log I get things like "40157.6223187153" as a string from the XML file. How can I convert this to something useful? In VB6 I am able to use CDate(40157.6223187153) to convert to a date but what am I to do if I have a string? I have tried CDate(CDbl("40157.6223187153")) but that gives me an overflow. Any ideas?
I also have a related question. I first thought I could use the "date" property to decide in which order items are presented in the log. That seems to be impossible since the "date" property is often equal for more than one log item. Is there any other way to find out in which order log items are presented, i.e the order in which I would like to report results to Quality Center?
Since there is no way to catch and handle exceptions in VBScript, which is the language we use in TestComplete, and report this as an error to Quality Center, I would instead like to report results after the test has finished.
I now have a problem. I am not able to convert the "date" properties from the log items to anything useful. When I parse the log I get things like "40157.6223187153" as a string from the XML file. How can I convert this to something useful? In VB6 I am able to use CDate(40157.6223187153) to convert to a date but what am I to do if I have a string? I have tried CDate(CDbl("40157.6223187153")) but that gives me an overflow. Any ideas?
I also have a related question. I first thought I could use the "date" property to decide in which order items are presented in the log. That seems to be impossible since the "date" property is often equal for more than one log item. Is there any other way to find out in which order log items are presented, i.e the order in which I would like to report results to Quality Center?