what's the proper syntax to get a time including milliseconds for further processing with datediff?
Code: Select all
<date YYYY-MM-DD hh:nn:ss###>
^^^Code: Select all
<date YYYY-MM-DD hh:nn:ss###>
^^^Code: Select all
echo "<date hh:nn:ss.fff>";Code: Select all
$start = <date YYYY-MM-DD hh:nn:ss>;
wait(1000);
$stop = <date YYYY-MM-DD hh:nn:ss>;
$runtime = datediff($start, $stop, "ms");
msg($runtime);
$start = <date YYYY-MM-DD hh:nn:ss.fff>;
wait(1000);
$stop = <date YYYY-MM-DD hh:nn:ss.fff>;
$runtime = datediff($start, $stop, "ms");
msg($runtime);Code: Select all
$start = "<date YYYY-MM-DD hh:nn:ss.fff>";
wait(1000);
$stop = "<date YYYY-MM-DD hh:nn:ss.fff>";
$runtime = datediff($start, $stop, "ms");
msg($runtime);
Correctdate needs quoting when you use .fff
Code: Select all
v16.90.0103 - 2016-06-07 23:35
> Scripting: Since the change in order of operator precedence in v16.80.0006
(2016-05-25 13:35), XY native variables with dots cannot be used unquoted
anymore because the dots are now seen as concatenators. For example, this
line will lead to a syntax error:
echo <prop #audio.bitrate>;
You have to do one of these to make it work:
echo <prop "#audio.bitrate">;
echo "<prop #audio.bitrate>";
Code: Select all
<...>Fair enough.admin wrote:Not a bug, but a syntax error. See change log:
Code: Select all
echo <date hh:nn:ss.fff>;