> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-bradley-turek-pfilter-operators-reference.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Beast Mode Functions Reference Guide

## Intro

This reference guide describes supported functions in Beast Mode.

***

## Supported Functions

You can use any of the following functions in calculations. You can see examples of many of the functions in the following articles:

* [Sample Basic Transforms](/s/article/360043430073)
* [Sample Card Element Transforms](/s/article/360043430093)
* [Sample Date Transforms](/s/article/360042925494)
* [Sample Mathematical Transforms](/s/article/360042925514)
* [Sample Miscellaneous Transforms](/s/article/360043430113)
* [Sample Period-over-Period Transforms](/s/article/360043430133)

### Aggregate Functions

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:209;a">
  <thead>
    <tr>
      <th colspan="1" rowspan="1">
        <p> Function Name </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Description </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Example </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> APPROXIMATE COUNT (DISTINCT) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the approximate count of a number of unique values in a
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> APPROXIMATE\_COUNT\_DISTINCT(`Customers`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> AVG </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the average value for each series in a column. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> AVG(`Operating Budget`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CEILING </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the highest value for each series in a column. </p>

        <p>
          {" "}

          This function differs from the <code> MAX </code> function in that{" "}
          <code> CEILING </code> is rounded whereas <code> MAX </code> is not
          rounded.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CEILING(`Operating Budget`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> COUNT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the number of row values in a column. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> COUNT(`Customers`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> COUNT (DISTINCT) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the count of a number of unique values in a column. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> COUNT(DISTINCT `Customers`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> FLOOR </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the lowest value for each series in a numeric column. </p>

        <p>
          {" "}

          This function differs from the <code> MIN </code> function in that{" "}
          <code> FLOOR </code> is rounded whereas MIN is not.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> FLOOR(`Operating Budget`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_EXTRACT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Extracts the approximate number of distinct values from an HLL++
          sketch. Returns a numeric estimate. Syntax:{" "}
          <code> HLL\_SKETCH\_EXTRACT(\<sketch\_expression>) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_EXTRACT(`sketch_col`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_INIT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Creates an HLL++ sketch from an expression or column. The optional{" "}
          <code> max\_log\_k </code> parameter controls sketch precision (range
          4–21, default 12). Syntax:{" "}
          <code> HLL\_SKETCH\_INIT(\<expression> \[, max\_log\_k]) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_INIT(`Customers`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_MERGE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the approximate distinct count from merged HLL++ sketches.
          Equivalent to calling{" "}

          <code>
            {" "}

            HLL\_SKETCH\_EXTRACT(HLL\_SKETCH\_MERGE\_PARTIAL(\<sketch\_expression>)){" "}
          </code>

          . Syntax: <code> HLL\_SKETCH\_MERGE(\<sketch\_expression>) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_MERGE(`sketch_col`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_MERGE\_PARTIAL </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Combines multiple HLL++ sketches into a single aggregated sketch. Use
          in GROUP BY scenarios to consolidate sketches across rows or
          partitions. Syntax:{" "}
          <code> HLL\_SKETCH\_MERGE\_PARTIAL(\<sketch\_expression>) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> HLL\_SKETCH\_MERGE\_PARTIAL(`sketch_col`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> MAX </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the highest value for each series in a numeric column. </p>

        <p>
          {" "}

          This function differs from the <code> CEILING </code> function in that{" "}
          <code> MAX </code> is not rounded whereas <code> CEILING </code> is
          rounded.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> MAX(`Operating Budget`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> MIN </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the lowest value for each series in a numeric column. </p>

        <p>
          {" "}

          This function differs from the <code> FLOOR </code> function in that{" "}
          <code> MIN </code> is not rounded whereas <code> FLOOR </code> is
          rounded.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> MIN(`Operating Budget`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> STDDEV\_POP </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the population standard deviation for each series in a numeric
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> STDDEV\_POP(`Values`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SUM </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the sum of each series in a numeric column. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SUM(`Values`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SUM (DISTINCT) </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the sum of unique values in a numeric column. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SUM(DISTINCT `Values`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> VAR\_POP </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the population standard variance for each series in a numeric
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code>
            {" "}

            VAR\_POP(`Values`) <a id="mathematical" target="_blank" />
          </code>
        </p>
      </td>
    </tr>
  </tbody>
</table>

<Note>
  **Note:** The HLL++ sketch functions have platform-specific equivalents. If
  you are working with a Cloud Integrations DataSet, refer to the corresponding
  function in your connected platform:

  <table border="1" cellpadding="1" cellspacing="1"><thead><tr><th colspan="1" rowspan="1"><p> Domo Function </p></th><th colspan="1" rowspan="1"><p> BigQuery </p></th><th colspan="1" rowspan="1"><p> Databricks </p></th><th colspan="1" rowspan="1"><p> Snowflake </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p><code> HLL\_SKETCH\_INIT </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_COUNT.INIT </code></p></td><td colspan="1" rowspan="1"><p><code> hll\_sketch\_agg </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_ACCUMULATE </code></p></td></tr><tr><td colspan="1" rowspan="1"><p><code> HLL\_SKETCH\_EXTRACT </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_COUNT.EXTRACT </code></p></td><td colspan="1" rowspan="1"><p><code> hll\_sketch\_estimate </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_ESTIMATE </code></p></td></tr><tr><td colspan="1" rowspan="1"><p><code> HLL\_SKETCH\_MERGE\_PARTIAL </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_COUNT.MERGE\_PARTIAL </code></p></td><td colspan="1" rowspan="1"><p><code> hll\_union\_agg </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_COMBINE </code></p></td></tr><tr><td colspan="1" rowspan="1"><p><code> HLL\_SKETCH\_MERGE </code></p></td><td colspan="1" rowspan="1"><p><code> HLL\_COUNT.MERGE </code></p></td><td colspan="1" rowspan="1"><p><code> hll\_union </code></p></td><td colspan="1" rowspan="1"><p><code> HLL </code></p></td></tr></tbody></table>
</Note>

Learn how to [use aggregate functions in Summary Numbers](#apply-a-calculation-to-a-summary-number).

### Mathematical Functions

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:209;a">
  <thead>
    <tr>
      <th colspan="1" rowspan="1">
        <p> Function Name </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Description </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Example </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> ABS </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the absolute value for all values in a numeric column. </p>

        <p>
          {" "}

          In other words, any negative values become positive, and positive
          values stay the same. This is valuable when you want to see
          aggregation without considering positive and negative values.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> ABS(`Operating Budget`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> MOD </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the remainder of each value in a numeric column divided by
          some specified number (dividend).{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> MOD(`Values`,2) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> POWER </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns each value in a numeric column raised to a given power. If the
          column contains multiple series, the values are summed for each
          series.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> POWER(`Values`,2) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> RAND </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns random values between 0 and 1. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> RAND(`Values`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> ROUND </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns values in a numeric column rounded to the nearest specified
          decimal place. <a id="logical" target="_blank" />
        </p>

        <p>
          {" "}

          If you do not include a decimal place value in the function, returned
          values are rounded to the nearest whole number.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> ROUND(`Values`,1) </code>
        </p>
      </td>
    </tr>
  </tbody>
</table>

### Logical Functions

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:209;a">
  <thead>
    <tr>
      <th colspan="1" rowspan="1">
        <p> Function Name </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Description </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Example </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CASE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Use to begin logical statements in which the value of data is replaced
          when certain criteria is reached (when...then or when...then, else).
          These statements use the following format: <br />

          <br />

          <code> CASE `Value` when x then 'resultx' else 'resulty' End </code>
        </p>

        <p>
          {" "}

          or <br />
        </p>

        <p>
          <code>
            {" "}

            CASE when `Value`= <em> x </em> then 'resultx' else 'resulty'
            End{" "}
          </code>
        </p>

        <p>
          {" "}

          In other words, when the data in the "Value" column equals number{" "}
          <em> x </em>, value <em> resultx </em> is returned; otherwise value{" "}
          <em> resulty </em> is returned. (The value returned can be either a
          single-quoted string or a number.){" "}
        </p>

        <p>
          {" "}

          For multiple conditional statements, use the following format: <br />

          <br />

          <code>
            {" "}

            CASE when `Value`= <em> x </em> then 1 when `Value`= <em> y </em>{" "}
            then 2 end{" "}
          </code>
        </p>

        <p>
          {" "}

          Although valid, avoid using the following inefficient format: <br />

          <br />

          <code>
            {" "}

            CASE when `Value`= <em> x </em> then 1 else CASE when `Value`={" "}
            <em> y </em> then 2 end end{" "}
          </code>
        </p>

        <p>
          <b> IN Operator </b>

          <br />

          <br /> In a <code> CASE when </code> clause, you can use the{" "}
          <code> IN </code> operator, which lets you specify multiple values to
          evaluate. <br />

          <br />

          <code> `column_name` IN (value1,value2,...) </code>

          <br />

          <br />

          <br />

          <code> CASE when `State` in ('NY', 'TX') then 0 else 1 end </code>
        </p>

        <p>
          <b> LIKE Operator </b>

          <br />

          <br /> In a <code> CASE when </code> clause, you can use the{" "}
          <code> LIKE </code> operator, which lets you search for a specified
          pattern in a column. <br />

          <br />

          <code> `column_name` LIKE pattern </code>
        </p>

        <p>
          <code>
            {" "}

            CASE when `State` like '%TX%' or `State` like '%NY' then 0 else 1
            end{" "}
          </code>

          <br />

          <br /> You can use these wildcards with the <code> LIKE </code>
          <code /> operator:{" "}
        </p>

        <ul>
          <li>
            <p>
              <code> % </code> to match any number of characters, even zero
              characters. <br />
              <code> like '%TX%' </code>
            </p>
          </li>

          <li>
            <p>
              <code> \_ </code> to match exactly one character. <br />
              <code> like '\_hn%' </code>
            </p>
          </li>
        </ul>

        <p>
          {" "}

          Values for the <code> LIKE </code> operator are matched in order of
          the <code> WHEN </code> statements. For example, if a value in the
          data matches the first and fourth <code> LIKE </code> operators, it is
          applied to the first operation.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code>CASE when `Amount`=1 then 10 else 0 End</code>
        </p>

        <p>
          <code>
            CASE `Gender` when 'M' then 'Male' when 'F' then 'Female' end
          </code>
        </p>

        <p>
          <code>
            CASE when `Pennies` >= 600 then 'Large' when `Pennies` \<= 300
            then 'Small' else `Pennies` end
          </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> IFNULL </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Used in logical statements in which you want to specify a replacement
          for null values.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> IFNULL(`Values`,0) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> NULLIF </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns null if the value in the first column equals the value in the
          second column; otherwise returns the value in the first column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> NULLIF(`Value 1`,`Value 2`) </code>
        </p>
      </td>
    </tr>
  </tbody>
</table>

**Video - Case Statement Overview**

<iframe allowfullscreen="allowfullscreen" frameborder="0" height="315" src="//www.youtube-nocookie.com/embed/xFofhklohSc" width="560" />

### String Functions

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:209;a">
  <thead>
    <tr>
      <th colspan="1" rowspan="1">
        <p> Function </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Description </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Example </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CONCAT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Combines strings from two or more string columns. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CONCAT(`First Name`,' ',`Last Name`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> INSTR </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the position of the first instance of a specified string in a
          given column, starting from the first letter in the name.{" "}
        </p>

        <p>
          {" "}

          In the example at right, the calculation would return the position of
          the first instance of the letter "e" in each string in the
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> INSTR(`Group`,'e') </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> LEFT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the specified number of characters in each string in the the
          given column, starting from the left.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> LEFT(`Group`,3) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> LENGTH </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the number of characters in each string in the given
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> LENGTH(`Group`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> LOWER </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Converts strings from one or more string columns into lower-case.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> LOWER(`Product Type`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> REPLACE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Replaces all of the specified strings in a given column with another
          specified string.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code>
            {" "}

            REPLACE(`Department`,'Human Resnources','Human Resources'){" "}
          </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> RIGHT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the specified number of characters in the given column,
          starting from the right.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> RIGHT(`Group`,3) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SUBSTRING </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Extracts and returns a specified number of characters from the values
          in a string column.{" "}
        </p>

        <p>
          {" "}

          You specify the characters to return by indicating the starting
          position and the length of characters. For example, specifying the
          position as 1 and the length as 3 would return the first, second, and
          third characters for values in the column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SUBSTRING(`Employee Name`,1,3) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TRIM </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Trims leading and trailing spaces for all values in string
          columns.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TRIM(`Employee Name`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> UPPER </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Converts strings from one or more string columns into upper-case.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code>
            {" "}

            UPPER(`Customers`) <a id="date_and_time" target="_blank" />
          </code>
        </p>
      </td>
    </tr>
  </tbody>
</table>

### Date and Time Functions

<Note>
  **Note:** The `WEEKDAY` function is not supported in Beast Mode. If `WEEKDAY` is used, it is replaced with the functionality of `DAYOFWEEK`.
</Note>

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:209;a">
  <thead>
    <tr>
      <th colspan="1" rowspan="1">
        <p> Function </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Description </p>
      </th>

      <th colspan="1" rowspan="1">
        <p> Example </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> ADDDATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Adds date or datetime values (as intervals) to date values in a date
          column.{" "}
        </p>

        <p>
          {" "}

          You can specify the date or datetime values to add to date values in a
          date column by specifying the column, interval, expression, and unit,
          as in <code> ADDDATE(`datecolumn`, interval expr unit ) </code>{" "}
          where <em> datecolumn </em> is the column containing a date value,
          where <em> expr </em> is the argument containing the date or datetime
          value to add, and where <em> unit </em> is the string value for the
          corresponding date or datetime unit type.{" "}
        </p>

        <p>
          {" "}

          You can prefix the expression with a "-" to subtract the value.
          Specify the unit value (such as second, minute, hour, day, week,
          month, quarter, year). (The "interval" keyword and unit type values
          are case insensitive.) For more information, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Unit type values in Beast Mode.{" "}
          </a>
        </p>

        <p>
          {" "}

          For example, adding 12 days to <code> January 4 </code> would return{" "}
          <code> January 16 </code>.{" "}
        </p>

        <p>
          {" "}

          Same as <code> DATE\_ADD </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> ADDDATE(`DateCol`, interval 12 day) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> ADDTIME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Adds a specified number of seconds to all values in a time column. For
          example, adding 15 seconds to <code> 8:05 </code> would return{" "}
          <code> 8:20 </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> ADDTIME(`Time`,25) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CURDATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the current date. </p>
        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Same as <code> CURRENT\_DATE </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CURDATE() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CURTIME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the current time. </p>
        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Same as <code> CURRENT\_TIME </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CURTIME() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CURRENT\_DATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the current date. </p>
        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Same as <code> CURDATE </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CURRENT\_DATE() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CURRENT\_TIME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the current time. </p>
        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Same as <code> CURTIME </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CURRENT\_TIME() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> CURRENT\_TIMESTAMP </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the value of current date and time in{" "}
          <code> YYYY-MM-DD HH:MM:SS </code> format.{" "}
        </p>

        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Same as <code> NOW </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> CURRENT\_TIMESTAMP() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Extracts and returns the dates from datetime values. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DATE(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DATEDIFF </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the number of days between two dates from datetime
          values.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DATEDIFF(CURRENT\_DATE(), `lastmoddate`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DATE\_ADD </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Adds date or datetime values (as intervals) to date values in a date
          column.{" "}
        </p>

        <p>
          {" "}

          You can specify the date or datetime values to add to date values in a
          date column by specifying the column, interval, expression, and unit,
          as in <code>
          DATE\_ADD(`datecolumn`, interval expr unit)
          </code> where <em> datecolumn </em> is the column containing a date
          value, where <em> expr </em> is the argument containing the date or
          datetime value to add, and where <em> unit </em> is the string value
          for the corresponding date or datetime unit type.{" "}
        </p>

        <p>
          {" "}

          You can prefix the expression with a "-" to subtract the value.
          Specify the unit value (such as second, minute, hour, day, week,
          month, quarter, year). (The "interval" keyword and unit type values
          are case insensitive.) For more information, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Unit type values in Beast Mode{" "}
          </a>

          .{" "}
        </p>

        <p>
          {" "}

          For example, adding 12 days to <code> January 4 </code> would return{" "}
          <code> January 16 </code>.{" "}
        </p>

        <p>
          {" "}

          Same as <code> ADDDATE </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DATE\_ADD(`DateCol`, interval 12 day) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DATE\_FORMAT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Formats dates in a date/time column into a specific format. </p>

        <div class="mdx-embed">
          <Note>
            <p>
              <b> Note: </b> Beast Mode uses SQL-like date and time
              formats.{" "}
            </p>
          </Note>
        </div>

        <p>
          {" "}

          You can specify the format to use for a date or time column by
          specifying the column and the date or time string, as in{" "}
          <code> DATE\_FORMAT(`datecolumn`,' format ') </code> where{" "}
          <em> datecolumn </em> is the column containing a date value and where{" "}
          <em> format </em> is the string containing specifier characters to use
          in formatting the date value.{" "}
        </p>

        <p>
          {" "}

          The "%" character is required before format specifier characters.{" "}
        </p>

        <p>
          {" "}

          For example, using{" "}
          <code> DATE\_FORMAT(`MyDate`,'%Y-%m-%d %h:%i %p') </code>, the date in
          the <em> MyDate </em> date column uses this format: 2013-04-17 10:10
          AM.{" "}
        </p>

        <p>
          {" "}

          For information about specifier characters, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Date Format Specifier Characters in Beast Mode{" "}
          </a>

          .{" "}
        </p>

        <p>
          {" "}

          Similar to <code> TIME\_FORMAT </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DATE\_FORMAT(`DateCol`,'%y') </code>

          <br />

          <code> DATE\_FORMAT(`DateCol`,'%m/%d') </code>

          <br />

          <code> DATE\_FORMAT(NOW(),'%d %b %Y %T') </code>

          <br />

          <code>
            {" "}

            DATE\_FORMAT(STR\_TO\_DATE(`DateCol`, '%m,%d,%Y'), '%m/%d/%Y'){" "}
          </code>

          <br />

          <code>
            {" "}

            ADDDATE(DATE\_FORMAT(`DateCol`, '%Y-%m-%d'), interval 12 day){" "}
          </code>

          <br />

          <code>
            {" "}

            PERIOD\_DIFF(DATE\_FORMAT(CURDATE(), '%Y%m'), DATE\_FORMAT(`DateCol`,
            '%Y%m')){" "}
          </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DATE\_SUB </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Subtracts date or datetime values (as intervals) to date values in a
          date column.{" "}
        </p>

        <p>
          {" "}

          You can specify the date or datetime values to subtract from date
          values in a date column by specifying the column, interval,
          expression, and unit, as in{" "}
          <code> DATE\_SUB(`datecolumn`, interval expr unit ) </code>
          where <em> datecolumn </em> is the column containing a date value,
          where <em> expr </em> is the argument containing the date or datetime
          value to subtract, and where <em> unit </em> is the string value for
          the corresponding date or datetime unit type.{" "}
        </p>

        <p>
          {" "}

          You can prefix the expression with a "-" to add the value. Specify the
          unit value (such as second, minute, hour, day, week, month, quarter,
          year). (The "interval" keyword and unit type values are case
          insensitive.) For more information, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Unit type values in Beast Mode{" "}
          </a>

          .{" "}
        </p>

        <p>
          {" "}

          For example, subtracting 12 days from <code> January 24 </code> would
          return <code> January 12 </code>.{" "}
        </p>

        <p>
          {" "}

          Same as <code> SUBDATE </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DATE\_SUB(`DateCol`, interval 12 day) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DAY </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the numerical day of the month for all values in a date/time
          column.{" "}
        </p>

        <p>
          {" "}

          Same as <code> DAYOFMONTH </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DAY(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DAYNAME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the name of the day of the week for all values in a date/time
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DAYNAME(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DAYOFMONTH </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the numerical day of the month for all values in a date/time
          column.{" "}
        </p>

        <p>
          {" "}

          Same as <code> DAY </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DAYOFMONTH(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DAYOFWEEK </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the numerical day of the week for all values in a date/time
          column (e.g. "2" for "Monday").{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DAYOFWEEK(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> DAYOFYEAR </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the numerical day of the year for all values in a date/time
          column (e.g. "226" for the 226th day of the year).{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> DAYOFYEAR(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> FROM\_DAYS </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Converts day numbers into dates. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> FROM\_DAYS(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <code> FROM\_UNIXTIME </code>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns a UNIX datetime value from a UNIX date/time column using the
          specified format.{" "}
        </p>

        <p>
          {" "}

          For information about specifier characters, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Date Format Specifier Characters in Beast Mode{" "}
          </a>

          .{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> FROM\_UNIXTIME(`UnixDateCol`,'%Y %d %m %h:%i:%s %x') </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> HOUR </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the hour for all values in a date/time column (e.g. the time
          "3:36" would return "3").{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> HOUR(`Time`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> LAST\_DAY </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Aggregates values for each month in a date/time column and returns
          each aggregation as the last day of each month.{" "}
        </p>

        <p>
          {" "}

          For example, if a date/time column had "15," "16," and "17" as values
          for January, only the last given date of January would appear, with a
          combined value of 48.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> LAST\_DAY(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> MINUTE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the value for each minute in a time column. </p>

        <p>
          {" "}

          If there is more than one instance of a particular minute in the
          column, the values for those minutes are aggregated.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> MINUTE(`Time`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> MONTH </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the month number (e.g. "9" for September) for all values in a
          date/time column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> MONTH(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> MONTHNAME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the name of the month (e.g. "September" rather than "9") for
          all values in a date/time column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> MONTHNAME(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> NOW </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the value of current date and time in{" "}
          <code> YYYY-MM-DD HH:MM:SS </code> format.{" "}
        </p>

        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Same as <code> CURRENT\_TIMESTAMP </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> NOW() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> PERIOD\_ADD </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Adds the specified number of months to the values in a date column.
          For this to work, the date values must be months in the format{" "}
          <code> YYYYMM </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> PERIOD\_ADD(`Month`,6) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> PERIOD\_DIFF </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the number of months between months in two date columns.{" "}
        </p>

        <p>
          {" "}

          For this to work, the date values must be months in the format{" "}
          <code> YYYYMM </code>. For example, if one column contained the date
          value <code> 200803 </code> and another contained the value{" "}
          <code> 200809 </code>, this function would return 6.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> PERIOD\_DIFF(201309,201301) </code>

          <br />

          <code> PERIOD\_DIFF(`Month 1`, `Month 2`) </code>

          <br />

          <code>
            {" "}

            PERIOD\_DIFF(DATE\_FORMAT(CURDATE(), '%Y%m'), DATE\_FORMAT(`DateCol`,
            '%Y%m')){" "}
          </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> QUARTER </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Aggregates date value data into quarters in a year. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> QUARTER(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SECOND </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the value for each second in a time column. If there is more
          than one instance of a particular second in the column, the values for
          those seconds are aggregated.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SECOND(`Time`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SEC\_TO\_TIME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Converts seconds into hours, minutes, and seconds. For example,{" "}
          <code> 3489 </code> would be converted into <code> 00:58:09 </code>
          .{" "}
        </p>

        <div class="mdx-embed">
          <Note>
            <p>
              <b> Note: </b> The sec\_to\_time function is limited to 24 hours.
              When a value is greater than 24 hours, it will overflow and loop
              back to 0 hours.{" "}
            </p>
          </Note>
        </div>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SEC\_TO\_TIME(`Seconds`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> STR\_TO\_DATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Converts strings (that Domo does not recognize as dates) from one or
          more string columns into datetime values. You specify the column(s)
          and the current date format used in those columns.{" "}
        </p>

        <p>
          {" "}

          By default, datetime values are returned in the output format{" "}
          <code> %m-%d-%Y </code>. You can change the output format by enclosing
          your <code> STR\_TO\_DATE </code> calculation in a{" "}
          <code> DATE\_FORMAT </code> calculation that specifies the date format
          specifier characters you want.{" "}
        </p>

        <p>
          {" "}

          For information about specifier characters, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Date Format Specifier Characters in Beast Mode{" "}
          </a>

          .{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> STR\_TO\_DATE(`DateCol`,'%m,%d,%Y') </code>

          <br />

          <code>
            {" "}

            DATE\_FORMAT(STR\_TO\_DATE(`DateCol`, '%m,%d,%Y'), '%m/%d/%Y'){" "}
          </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SUBDATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Subtracts date or datetime values (as intervals) to date values in a
          date column.{" "}
        </p>

        <p>
          {" "}

          You can specify the date or datetime values to subtract from date
          values in a date column by specifying the column, interval,
          expression, and unit, as in{" "}
          <code> SUBDATE(`datecolumn`, interval expr unit ) </code> where{" "}
          <em> datecolumn </em> is the column containing a date value, where{" "}
          <em> expr </em> is the argument containing the date or datetime value
          to subtract, and where <em> unit </em> is the string value for the
          corresponding date or datetime unit type.{" "}
        </p>

        <p>
          {" "}

          You can prefix the expression with a "-" to add the value. Specify the
          unit value (such as second, minute, hour, day, week, month, quarter,
          year). (The "interval" keyword and unit type values are case
          insensitive.) For more information, see{" "}

          <a href="/s/article/360043429953" target="_self" title="Date Format Specifier Characters in Beast Mode">
            {" "}

            Unit type values in Beast Mode{" "}
          </a>

          .{" "}
        </p>

        <p>
          {" "}

          For example, subtracting 12 days from <code> January 24 </code> would
          return <code> January 12 </code>. Same as <code> DATE\_SUB </code>
          .{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SUBDATE(`DateCol`, interval 12 day) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SUBTIME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Subtracts a specified number of seconds from all values in a time
          column.{" "}
        </p>

        <p>
          {" "}

          For example, subtracting 30 seconds from <code> 8:05:45 </code> would
          return <code> 8:05:15 </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SUBTIME(`Time`,15) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> SYSDATE </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the current date and time in YYYY-MM-DD HH:MM:SS format, as in{" "}
          <code> 2014-04-03T19:25:29 </code>.{" "}
        </p>

        <p> No column name is specified in this function. </p>

        <p>
          {" "}

          Similar to <code> CURRENT\_DATE </code> and <code> CURRENT\_TIME </code>
          .{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> SYSDATE() </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TIME </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Extracts the times from datetime values. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TIME(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TIMEDIFF </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the difference between values in two date/time columns,
          expressed as a time value.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TIMEDIFF(`Time 1`,`Time 2`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TIMESTAMP </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns values in a date column as datetime values. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TIMESTAMP(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TIME\_FORMAT </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Formats time in a datetime column into a specific format. </p>

        <div class="mdx-embed">
          <Note>
            <p>
              <b> Note: </b> Beast Mode uses SQL-like date and time
              formats.{" "}
            </p>
          </Note>
        </div>

        <p>
          {" "}

          You can specify the format to use for time values in a time column by
          specifying the column and the time string, as in{" "}
          <code> TIME\_FORMAT(`datetimecolumn`,' format ') </code> where{" "}
          <em> datetimecolumn </em> is the column containing a time value and
          where <em> format </em> is the string containing specifier characters
          to use in formatting the time value.{" "}
        </p>

        <div class="mdx-embed">
          <Note>
            <p>
              <b> Note: </b> The format specifiers used in{" "}
              <code> DATE\_FORMAT </code> may be used with{" "}
              <code> TIME\_FORMAT </code>, but specifiers other than hours,
              minutes, seconds and microseconds produce a NULL value or 0.{" "}
            </p>
          </Note>
        </div>

        <p>
          {" "}

          The "%" character is required before format specifier characters.{" "}
        </p>

        <p>
          {" "}

          For example, using <code> TIME\_FORMAT(`Date`,'%h:%i:%s') </code>, the
          date in the transformed time column uses this format: 12:20:12.{" "}
        </p>

        <p>
          {" "}

          For information about specifier characters, see{" "}

          <a class="confluence-link" href="/s/article/360043429953" target="_self">
            {" "}

            Date Format Specifier Characters for Beast Mode{" "}
          </a>
        </p>

        <p>
          {" "}

          Similar to <code> DATE\_FORMAT </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TIME\_FORMAT(`Date`,'%h:%i:%s') </code>

          <br />

          <code> TIME\_FORMAT(NOW(),'%h:%i:%s') </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TIME\_TO\_SEC </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns an elapsed number of seconds for all values in a date/time
          column.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TIME\_TO\_SEC(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> TO\_DAYS </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the number of days since year 0 for all values in a date/time
          column. For example, the date "01-06-2010" would be returned as
          "734143," since 734,143 days have transpired between that date and
          January 1st of year 0.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> TO\_DAYS(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <code> UNIX\_TIMESTAMP </code>
      </td>

      <td colspan="1" rowspan="1">
        {" "}

        Returns UNIX time stamps for all values in a date/time column.{" "}
      </td>

      <td colspan="1" rowspan="1">
        <code> UNIX\_TIMESTAMP(`DateCol`) </code>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <code> WEEK </code>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the week number for each value of the indicated date or
          date-time column.{" "}
        </p>

        <p>
          {" "}

          Syntax: <code> WEEK(`dateCol`, mode) </code>.{" "}
        </p>

        <p>
          {" "}

          For a Sunday-Saturday week frame, use mode 11:{" "}
          <code> WEEK(`dateCol`, 11). </code>
        </p>

        <p>
          {" "}

          For a Monday-Sunday week frame, use mode 22:{" "}
          <code> WEEK(`dateCol`, 22). </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <code> WEEK(`DateCol`,22) </code>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> YEAR </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p> Returns the year for all values in a date/time column. </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> YEAR(`DateCol`) </code>
        </p>
      </td>
    </tr>

    <tr>
      <td colspan="1" rowspan="1">
        <p>
          <code> YEARWEEK </code>
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          {" "}

          Returns the year and week number for each value of the indicated date
          or date-time column in "YYYYWW" format. For example, a date in the 5th
          week of the year 2020 will return "202005".{" "}
        </p>

        <p>
          {" "}

          Syntax: <code> YEARWEEK(`dateCol`, mode) </code>
        </p>

        <p>
          {" "}

          For a Sunday to Saturday week frame, use mode 11:{" "}
          <code> YEARWEEK(`dateCol`, 11) </code>.{" "}
        </p>

        <p>
          {" "}

          For a Monday to Sunday week frame, use mode 22:{" "}
          <code> YEARWEEK(`dateCol`, 22) </code>.{" "}
        </p>
      </td>

      <td colspan="1" rowspan="1">
        <p>
          <code> YEARWEEK(`DateCol`,11) </code>
        </p>
      </td>
    </tr>
  </tbody>
</table>

## Apply a Calculation to a Summary Number

If your Beast Mode calculation aggregates rows in your DataSet, you can use it in your card Summary Number. Calculations built using any of the following functions can be applied to your Summary Number:

* AVG

* COUNT

* COUNT (DISTINCT)

* MAX

* MIN

* SUM

* SUM (DISTINCT)

* STDDEV\_POP, VAR\_POP

When you add one of these functions, the Beast Mode calculation is automatically added to the list of available columns that may be used in the Summary Number for this card.

<Note>
  **Note:**
  For a Beast Mode calculation to work as the Summary Number, it must be aggregated in some way (for example, the
  `SUM()`
  function) or be the result of an operation on values within functions (for example,
  `SUM()`
  functions). For instance,
  `'Customers'`
  does NOT work for a Summary Number, but
  `SUM('Customers')`
  may be used as a Summary Number.
</Note>

For more information about Summary Numbers, see
[Configuring Your Chart Summary Number](/s/article/360043428753 "Configuring Your Chart Summary Number")
.

## Unsupported Functions

The following functions are no longer supported:
`SQRT`
,
`CONVERT_TZ`
,
`MICROSECOND`
,
`WEEKDAY`
