Skip to Main Content
Preset Feature Feedback
Status Needs review
Created by Customer Engagement
Created on Aug 15, 2025

Duration formatting option for numeric metrics (seconds → days/hours/minutes/seconds)

What is the problem or goal the end user is trying to solve or accomplish?

The customer has numeric fields representing elapsed time in seconds (e.g., 1,862) and wants to display them in a human-readable duration format (e.g., “31m 2s” or “1d 4h 12m 5s”). Currently, Preset does not have a built-in formatting option to convert seconds to an adaptive duration format in charts or tables.

How are they solving it currently?

They must pre-format the metric at the SQL/dataset level by casting it into a text string, using database-specific functions (e.g., TO_CHAR(...::interval) in PostgreSQL, SEC_TO_TIME() in MySQL, or manual math in BigQuery). This workaround has limitations:

  • The formatted column is treated as text, losing numeric sorting/aggregation capabilities.

  • The formatting must be hard-coded per database, and there is no adaptive logic across datasets.

What is the recommended solution by the Customer?

Add a “Duration” number format option in Preset’s visualization controls that interprets numeric values as seconds and renders them in an adaptive human-readable format (days/hours/minutes/seconds). This would work similarly to currency/percentage formatting, allowing users to keep the field numeric for aggregation and sorting, while displaying it in duration format across visualizations and tables.

  • Attach files
  • +1