Syntax error with beast mode
Trying to convert a column to seconds but I am getting a syntax error and cant figure out where the issue is..
TIME_TO_SEC(`AVG Answer`) + ( DATE_FORMAT(`AVG Answer`, '%f')/1000000)
Best Answer

@Stucker This looks like a datatype error. If I'm interpreting this correctly, you have a time field (`AVG Answer`) that you are trying to convert into a number of seconds/milliseconds. You are on the right track with the TIME_TO_SEC portion of the formula, but the problem is with the second part where you are looking for the number of milliseconds. The DATE_FORMAT function returns a text value, which cannot be used in mathematical expressions.
If you want to get down to millisecond granularity, then you will have to use a MagicETL instead of Beast Mode since the Formula Tile supports the MILLISECOND function, which returns a numerical output. Your calculation should look like this:
TIME_TO_SEC(`AVG Answer`) + ( MILLISECOND(`AVG Answer`)/1000000)
1
Answers

@Stucker This looks like a datatype error. If I'm interpreting this correctly, you have a time field (`AVG Answer`) that you are trying to convert into a number of seconds/milliseconds. You are on the right track with the TIME_TO_SEC portion of the formula, but the problem is with the second part where you are looking for the number of milliseconds. The DATE_FORMAT function returns a text value, which cannot be used in mathematical expressions.
If you want to get down to millisecond granularity, then you will have to use a MagicETL instead of Beast Mode since the Formula Tile supports the MILLISECOND function, which returns a numerical output. Your calculation should look like this:
TIME_TO_SEC(`AVG Answer`) + ( MILLISECOND(`AVG Answer`)/1000000)
1
Categories
 All Categories
 1.5K Product Ideas
 1.5K Ideas Exchange
 1.4K Connect
 1.1K Connectors
 283 Workbench
 4 Cloud Amplifier
 4 Federated
 2.7K Transform
 90 SQL DataFlows
 566 Datasets
 2K Magic ETL
 3.4K Visualize
 2.3K Charting
 596 Beast Mode
 14 App Studio
 29 Variables
 595 Automate
 149 Apps
 417 APIs & Domo Developer
 28 Workflows
 1 DomoAI
 28 Predict
 12 Jupyter Workspaces
 16 R & Python Tiles
 362 Distribute
 99 Domo Everywhere
 261 Scheduled Reports
 2 Software Integrations
 97 Manage
 94 Governance & Security
 14 Product Releases
 Community Forums
 37 Getting Started
 28 Community Member Introductions
 90 Community Announcements
 4.8K Archive