TestQA1
2 years agoFrequent Contributor
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 there any way I can also get milliseconds which limits to 3 digits like in the example above?
I'm using javascript.
Thanks
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