I have a field in the db that has a date/time stamp. I managed to pull the lowest and highest number which implies entry point and exit pointper user. I now want to find the time they spent in the site. I know I need to break the hh:mm:ss to be all seconds and then subtract and convert back to hh:mm:ss but I am haveing problems whith it. Here is my code:
DateVar strip_d:= DateTimeToTime ({InternetLog.LogTime});
DateVar start_time:= Minimum(strip_d,{InternetLog.ClientHost});
DateVar end_time:= Maximum(strip_d,{InternetLog.ClientHost});
NumberVar totalsec := end_time - start_time;
NumberVar hours := totalsec / 3600;
NumberVar mins := (hours - truncate(hours)) * 60;
NumberVar secs := (mins - truncate(mins)) *60;
StringVar HH := totext(truncate(hours));
StringVar MM := totext(truncate(mins));
StringVar SS := totext(round(secs, 0));
HH+":"+MM+":"+SS;
DateVar strip_d:= DateTimeToTime ({InternetLog.LogTime});
DateVar start_time:= Minimum(strip_d,{InternetLog.ClientHost});
DateVar end_time:= Maximum(strip_d,{InternetLog.ClientHost});
NumberVar totalsec := end_time - start_time;
NumberVar hours := totalsec / 3600;
NumberVar mins := (hours - truncate(hours)) * 60;
NumberVar secs := (mins - truncate(mins)) *60;
StringVar HH := totext(truncate(hours));
StringVar MM := totext(truncate(mins));
StringVar SS := totext(round(secs, 0));
HH+":"+MM+":"+SS;