Solved
Forum Discussion
shankar_r
9 years agoCommunity Hero
Hi,
I don't think we have direct internal method to achieve this scenarios. I'm using below code to convert it.
function test12()
{
var tempTime = aqConvert.StrToTime("00:25:54");
Log.Message(convertTimetoSeconds(tempTime));
}
function convertTimetoSeconds(timeObj)
{
//Parameter should be a time object
var hours = aqDateTime.GetHours(timeObj);
var minutes = aqDateTime.GetMinutes(timeObj);
var seconds = aqDateTime.GetSeconds(timeObj);
var totalMinues = minutes + (hours * 60);
var totalseconds = seconds + (totalMinues * 60);
return totalseconds;
//if you want to return minutes then
//return totalMinues;
}