Forum Discussion

TestQA1's avatar
TestQA1
Frequent Contributor
8 months ago
Solved

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
    8 months 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