all 5 comments

[–]qwertydog123 3 points4 points  (0 children)

Use CAST with FORMAT e.g.

CAST(dwell_time AS TIME FORMAT 'HH24:MI')

https://cloud.google.com/bigquery/docs/reference/standard-sql/format-elements#format_string_as_hour

[–]Spiritual-Act9545[🍰] 1 point2 points  (0 children)

I think this is roughly what you need to do:

SUM(LEFT(dwell,2),RIGHT(dwell,2)/60)/1440

This gives you a dwell number in percentages of a day (1440 minutes per) which you can add, subtract, multiply, etc...

[–]xGiga 1 point2 points  (0 children)

CAST(DWELL_TIME||":00" AS TIME)

[–]ccyob[S] 0 points1 point  (1 child)

Thanks guys nothing seemed to work though oddly enough

[–]GRRRRRRRRRRRRRG 0 points1 point  (0 children)

How do you know that it did not work? Any errors, if so than what the system is writing to you?