Reputation: 3
I'm trying to convert average total of seconds into time format PARSE_TIME( '%T', CAST(ROUND( IEEE_DIVIDE(SUM( totals.timeOnSite ), SUM(totals.visits)),0) AS STRING )) AS AvgSessionDuration,
code is valid, but it's giving me this error: Failed to parse input string "245"
Upvotes: 0
Views: 9146
Reputation: 172993
try below approach
time(timestamp_seconds(number_of_seconds_int64)) AS AvgSessionDuration
instead of PARSE_TIME( '%T', CAST(ROUND( IEEE_DIVIDE(SUM( totals.timeOnSite ), SUM(totals.visits)),0) AS STRING )) AS AvgSessionDuration
Upvotes: 2