replicating Google Analytics’ Time Format in DOMO
I want to show Time on Site (and ither metrics that report in minutes and seconds) the way Google Analytics does, but it shows up in DOMO as number of seconds.
Is there a solution at the connector level and is there a solution at the beastmode level (something I could do on the fly for reports do yesterday)?
Thanks all,
Best Answer

If you want to display the time on site data as minutescolonseconds (e.g. 2:30, instead of 150) you could use a beast mode like this:
CONCAT(FLOOR(`Time_On_Site_Field` / 60), ':' , MOD(`Time_On_Site_Field`, 60))
Note, however, that this will turn the output into text for display and you will no longer be able to do math on it.
If you need to use this in a sum, you can also add that to the beast mode like this:
CONCAT(FLOOR(SUM(`Time_On_Site_Field`) / 60), ':' , MOD(SUM(`Time_On_Site_Field`), 60))
The floor function is used to round down the division of the time on site divided by 60 to get hours. The MOD function returns only the remainder after the division of the time on site divided by 60 to get minutes.
I hope that helps!
3
Answers

If you want to display the time on site data as minutescolonseconds (e.g. 2:30, instead of 150) you could use a beast mode like this:
CONCAT(FLOOR(`Time_On_Site_Field` / 60), ':' , MOD(`Time_On_Site_Field`, 60))
Note, however, that this will turn the output into text for display and you will no longer be able to do math on it.
If you need to use this in a sum, you can also add that to the beast mode like this:
CONCAT(FLOOR(SUM(`Time_On_Site_Field`) / 60), ':' , MOD(SUM(`Time_On_Site_Field`), 60))
The floor function is used to round down the division of the time on site divided by 60 to get hours. The MOD function returns only the remainder after the division of the time on site divided by 60 to get minutes.
I hope that helps!
3 
Hey
Thanks! This is very helpful.
But after the calculation, the metric becomes a dimension.
How can I show the avg session time by month in a card?
Many thanks!
0 
There isn't a way to graph this data as a metric after converting it to minutescolonseconds format. If you want to graph the average session time by month, you'd need to pick a single unit of time (seconds, minutes, or hours) as your metric and convert the data to that unit (seconds\60 = minutes). Then you're graphing average session time in minutes per month.
0
Categories
 All Categories
 1.1K Product Ideas
 1.1K Ideas Exchange
 1.2K Connect
 969 Connectors
 257 Workbench
 Cloud Amplifier
 1 Federated
 2.4K Transform
 76 SQL DataFlows
 501 Datasets
 1.8K Magic ETL
 2.7K Visualize
 2.2K Charting
 375 Beast Mode
 20 Variables
 485 Automate
 103 Apps
 378 APIs & Domo Developer
 6 Workflows
 22 Predict
 6 Jupyter Workspaces
 16 R & Python Tiles
 316 Distribute
 64 Domo Everywhere
 252 Scheduled Reports
 59 Manage
 59 Governance & Security
 1 Product Release Questions
 5K Community Forums
 37 Getting Started
 23 Community Member Introductions
 63 Community Announcements
 4.8K Archive