Skip to main content

EPOCH

Use the EPOCH function to return the number of milliseconds since 1 January 1970.

Use

EPOCH()
Returns the number of milliseconds since 1 January 1970 as a number.


ReturnsNumber

Examples

Generating a Unique Reference ID

Because the millisecond count is constantly increasing, it can be used to generate a unique, non-repeating identifier for a request. Since EPOCH returns a number, you can convert it to text and combine it with a prefix using the TEXT and CONCAT functions.

  • Scenario: You need to map a unique "RequestID" to an Input for a reviewer to see on their form.
  • Formula: CONCAT("REQ-", TEXT(EPOCH()))
  • Logic:
    • EPOCH(): Generates the current millisecond count as a number.
    • TEXT(...): Converts that number into a text string so it can be combined with other characters.
    • CONCAT(...): Joins the literal text "REQ-" with the numeric string.
  • Result: The reviewer will see a unique ID such as "REQ-1732112345678".