Define custom datetime formats

Sigma enables you to define custom datetime formats to control how date data displays in workbooks.

This document provides an overview of custom format strings and explains how to use them to display custom date formats.


This document specifically refers to custom datetime formatting in the Sigma UI. For information about datetime formats supported by functions, see DateFormat and DateParse.

User requirements

To define a custom datetime format, you must be the workbook owner or be granted Can explore workbook permission.

Custom format strings

Custom format strings support individual format specifiers and combinations of multiple specifiers and characters, including letters, numbers, and symbols.

For example, the following table demonstrates the output of three different custom format strings applied to the value 2018-07-08 00:34:59:

Custom format stringOutput
%a, %b %d, %YSun, Jul 08, 2018
%I:%M:%S %p12:34:59 AM

Common format specifiers

The following table defines commonly used format specifiers. For a complete set of supported specifiers, reference the d3-time-format module.

FormatDescriptionExample output
(for 2018-07-08 00:34:59)
%YFour-digit year2018
%yTwo-digit year18
%qQuarter of the year (1–4)3
%mTwo-digit month07
%BFull month nameJuly
%bAbbreviated month nameJul
%AFull day of weekSunday
%aAbbreviated day of weekSun
%dTwo-digit day of month (01-31)08
%HTwo-digit hour based on 24-hour clock (00–23)00
%ITwo-digit hour based on 12-hour clock (01–12)12
%MTwo-digit minutes (00–59)34
%STwo-digit seconds (00–59)59
%pAM or PMAM
%LThree-digit milliseconds (000–999)000
%fSix-digit microseconds (000000–999999)000000
%ZTime zone offset-07:00
%%Percent sign%

Define a custom datetime format

  1. Use one of the following methods to access the Custom Format modal:

    • Column menu: In the header of the column you want to format, click the caret () to open the column menu, then select Format > Custom.

    • Toolbar: Select the column you want to format, then click the Format option in the workbook toolbar and select Custom date.

  2. In the Custom Format modal, enter the format string and confirm that the Example field reflects the datetime format you want to display.

  3. Adjust the format string, if needed, then click Apply. The column immediately reflects the custom datetime format.

Related resources