Forum Discussion

TestQA1's avatar
TestQA1
Frequent Contributor
2 years ago

Getting milliseonds with Time() method

Hi,   I have a time like this = 2023-09-06 14:21:18.630 where '630' is ms   when I use aqConvert.DateTimeToFormatStr(aqDateTime.Time(), "%H:%M:%S") it only gets current time upto seconds. Is the...
  • rraghvani's avatar
    2 years ago

    You can get current time like so,

    function Timestamp()
    {
        var d = Date.now()
        Log.Message(d);
    }

    this will return an Epoch time. E.g. 1694011583707 is 6 September 2023 14:46:23.707