Forum Discussion

crb's avatar
crb
Occasional Contributor
15 years ago

DateTime

Can ABS get the system time so I can create a date time string, e.g. - 20100806_132545 ?

4 Replies

  • Hi Chris,


    In TestComplete, you can try using the aqConvert.DateTimeToFormatStr method to do this, as in the following example:


    function Test()

    {

      Log.Message(aqConvert.DateTimeToFormatStr(aqDateTime.Now(), "%Y%m%d_%H%M%S"));

    }


    If your question is actually related to Automated Build Studio, please create a thread in the corresponding forum.

  • crb's avatar
    crb
    Occasional Contributor
    Thanks Allen.

    When I compile, I get "aqDateTime undefined".

    I'm not too familiar with JScript.  Do I need to "include" (speaking in C ++  term) a package

    in order to use date and time features?
  • Hi Chris,


    The aqDateTime and aqConvert scripting objects exist only in TestComplete 6.50 and newer versions of the tool. Do you face this error on these versions of TestComplete?

  • crb's avatar
    crb
    Occasional Contributor


    Yeah, I just need to get a later version of TestComplete and retest. Thanks