Forum Discussion
Philip_Baird
11 years agoCommunity Hero
Hi Mamatha, the behaviour you are describing is consistent with the documentation for the aqDateTime.Time() method, i.e
"In JScript or DelphiScript, if you try to output the time returned by the Time method as a string, conversion takes place and the time is outputted in the day/month/date/time/year format. For example, this occurs if you use the following code to post the current time to the test log:"
function Test()
{
Log.Message("Time is" + aqDateTime.Time());
}
"To avoid such a conversion, you need to explicity specify the format in which time should be displayed. For example, you can use the following code:"
function Test()
{
Log.Message("Time is" + aqConvert.DateTimeToFormatStr(aqDateTime.Time(), "%H:%M:%S"));
}
If you wish to get an accurate date/time value, you should use the aqDate.Now() method
Regards,
Phil Baird