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.2K Product Ideas
 1.2K Ideas Exchange
 1.4K Connect
 1.1K Connectors
 273 Workbench
 2 Cloud Amplifier
 3 Federated
 2.7K Transform
 78 SQL DataFlows
 525 Datasets
 2.1K Magic ETL
 2.9K Visualize
 2.2K Charting
 437 Beast Mode
 23 Variables
 513 Automate
 115 Apps
 390 APIs & Domo Developer
 8 Workflows
 26 Predict
 10 Jupyter Workspaces
 16 R & Python Tiles
 332 Distribute
 77 Domo Everywhere
 255 Scheduled Reports
 66 Manage
 66 Governance & Security
 1 Product Release Questions
 Community Forums
 40 Getting Started
 26 Community Member Introductions
 68 Community Announcements
 4.8K Archive