Format numeric and date fields

Format a numeric or date field to give additional context to an attribute so that it is more than a number. Numeric and date field formatting are layer properties that can be set only within the current map.

To apply numeric or date formatting to a field in a layer or stand-alone table, follow these steps:

  1. Right-click a layer or table in the Contents pane.
  2. Choose Data Design from the context menu and click Fields.

    The fields view appears, displaying the layer's fields in a tabular arrangement.

  3. Click the cell in the Number Format column for the row of the field you want to format.
  4. In the highlighted cell, click the Options button Options to open the Number Format dialog box.
  5. Select a format category.
    Some considerations to keep in mind when you select a format category include the following:

    • Numeric categories may include their own set of available formatting options.
    • Date fields have one category containing multiple formats.
    • Not all formats are supported when sharing.

  6. Click OK.
  7. Save the edits to the table to apply these changes.

Numeric formats

You can format a numeric value using one of 10 categories. Each number format category has its own set of available formatting options.

Number format categoryDescription

None

No specific number format. When applied, this option will remove any formatting and revert the setting to the default determined by the file type.

Numeric

General options for the display of numbers.

Specify the number of decimal places or significant digits to display, turn on or off options such as showing a thousands separator, padding the number with zeros, and including a suffix.

Percentage

Display a number as a percentage.

Specify if the number is already a percentage or if it represents a fraction. If it represents a fraction, the number is multiplied by 100.

Currency

Display a number in the localized currency format.

To display a number using a different currency format, use Custom.

Rate

Display a number as a specified rate.

Define the factor to divide the number by. The result is displayed.

Fraction

Display a decimal number as a fraction.

The decimal number will be converted based on the denominator chosen.

Scientific

Display a number in scientific notation.

Define the number of decimal places to show before the notation, for example, 1.234e+01

Direction

Display a decimal number representing directions.

Values can be displayed in degrees, minutes, seconds (122°55’14”) or quadrant bearing (N43°58'12"W) notations.

Angle

Display a number representing angles in either decimal degrees (143.25) or radians (2.5002).

Values can be displayed in their current angle format or converted to between the two.

Custom

Display a number using a custom format string.

Specify any combination of alphanumeric and either 0 or # characters to designate the number. Use # to only display current digits. Use 0 to pad with zeros when no digit is present in that numeric place.

Date and time formats

Date formats, unlike numeric formats, only have one category: Date. Within this category, you can choose from multiple supported date formats. The default is None, which includes the full date and time shown in the system's regional format, except for midnight when only the date is shown. You can choose System Default, in which the date displayed fully matches the default established by the operating system, or use Custom to generate your own format string.

Custom date and time formats

A custom format string consists of one or more date and time format specifiers. Use a single character to apply the standard date and time format strings. Combine two or more of the custom specifiers to create a custom date and time format.

Standard date and time specifiers

The following table summarizes the format specifiers that can be used to display a standard date and time format by using a single character:

Standard date and time format specifiers

Format specifierFormat typeDescription

d

Short date format

Month, day, and year value with no leading zeros separated by forward slashes.

D

Long date format

Full date in which the full name of the day of the week and month are used. The function uses the full day names associated with the specified locale, for example, Monday in English (United States).

f

Full date, short time format

Full date in which the full name of the day of the week and month are used, and time is shown in hours and minutes followed by a multicharacter time marker string, such as AM or PM.

The function uses the full day names associated with the specified locale, for example, Monday in English (United States).

F

Full date, long time format

Full date in which the full name of the day of the week and month are used, and time is shown in hours, minutes, and seconds followed by a multicharacter time marker string, such as AM or PM.

The function uses the full day names associated with the specified locale, for example, Monday in English (United States).

m

M

Month Day format

Two-digit month and two-digit day separated by a forward slash.

t

Short time format

Time portion only shown as hour colon minute followed by a multicharacter time marker string, such as AM or PM.

T

Long time format

Time portion only shown as hour colon minute colon second followed by a multicharacter time marker string, such as AM or PM.

y

Y

Year Month format

Full name of the month and year.

Custom date and time specifiers

The following table summarizes the format specifiers that can be combined to create a custom date and time format for interpreting data:

Custom date and time format specifiers

Format specifierFormat typeDescription

d

Day of Month

Day of month as digits with no leading zero for single-digit days.

dd

Day of Month

Day of month as digits with leading zero for single-digit days.

ddd

Day of Week

Day of week as a three-letter abbreviation. The function uses the abbreviations associated with the specified locale, for example, Mon in English (United States).

Tip:

Days of the week are not verified when interpreting a date value; therefore, it doesn't matter whether a day of the week appearing in your data correctly corresponds to the date represented in the data value.

dddd

Day of Week

Day of week as its full name. The function uses the full day names associated with the specified locale, for example, Monday in English (United States).

Tip:

Days of the week are not verified when interpreting a date value; therefore, it doesn't matter whether a day of the week appearing in your data correctly corresponds to the date represented in the data value.

M

Month

Month as digits with no leading zero for single-digit months.

MM

Month

Month as digits with leading zero for single-digit months.

MMM

Month

Month as a three-letter abbreviation. The function uses the month abbreviations associated with the specified locale, for example, Nov in English (United States).

MMMM

Month

Month as its full name. The function uses the full month names associated with the specified locale, for example, November for English (United States), and noviembre for Spanish (Spain).

y

Year

Year as last two digits but with no leading zero for years whose last two digits are less than 10.

Tip:

Years represented in this way can range from 1950 to 2049. A value of 49 or less is interpreted as occurring in the 21st century, for example, 7 is interpreted as 2007. A value of 50 or greater is interpreted as occurring in the 20th century, for example, 67 is interpreted as 1967.

yy

Year

Year represented by the last two digits but with a leading zero for years whose last two digits are less than 10.

Tip:

Years represented in this way can range from 1950 to 2049. A value of 49 or less is interpreted as occurring in the 21st century. For example, 07 is interpreted as 2007. A value of 50 or greater is interpreted as occurring in the 20th century, for example, 67 is interpreted as 1967.

yyy

Year

Year represented by three digits. Years represented in this way can range from 1 to 999.

yyyy

Year

Year represented by four digits.

gg

Era

Period/era string. The function uses the era values associated with the specified locale.

T

Time Separator

A delimiter that concatenates a preceding date value and a following time value. The function is typically seen in ISO formats.

h

Hour

Hour with no leading zero for single-digit hours; 12-hour clock.

H

Hour

Hour with no leading zero for single-digit hours; 24-hour clock.

hh

Hour

Hours with leading zero for single-digit hours; 12-hour clock.

HH

Hour

Hours with leading zero for single-digit hours; 24-hour clock.

m

Minute

Minutes with no leading zero for single-digit minutes.

mm

Minute

Minutes with leading zero for single-digit minutes.

s

Second

Seconds with no leading zero for single-digit seconds.

ss

Second

Seconds with leading zero for single-digit seconds.

s.s

Second

Seconds, including subseconds, with no leading zero for single-digit seconds. Although the format only shows one decimal place, any number of decimal places can be used.

Caution:

The precision of subsecond values is limited to what is supported for the time field data type. For example, if using a time field of field data type float or double, rounding errors should be expected.

ss.s

Second

Seconds, including subseconds, with leading zero for single-digit seconds. Although the format only shows one decimal place, any number of decimal places can be used.

Caution:

The precision of subsecond values is limited to what is supported for the time field data type, for example, if using a time field of field data type float or double, rounding errors should be expected.

t

Time Marker

One-character time marker string, such as A or P.

tt

Time Marker

Multicharacter time marker string, such as AM or PM.

z

Time Zone Designator

This value suffix indicates the time value offset from coordinated universal time (UTC) in hours. The function is typically seen in ISO formats.

zz

Time Zone Designator

This value suffix indicates the time value offset from coordinated universal time (UTC) in hours, using zero padding. The function is typically seen in ISO formats.

zzz

Time Zone Designator

This full value suffix indicates the time value offset from coordinated universal time (UTC) in hours, using zero padding and partial hours. The function is typically seen in ISO formats.

Separators

Separators are characters that separate information in text data values. Examples of commonly used separators are commas, colons, and spaces, but there are no restrictions on the separators that can be used to create format strings. You can create format strings without separators at all, especially when interpreting dates and times stored in numeric fields because numeric fields cannot store most of the commonly used separator characters.

In rare cases, data may contain separators that conflict with the formats in the table above. In these cases, single quotation marks must be used to isolate separators within your format string. In general, single quotation marks can be used to isolate separators within a format string, but it is not recommended that you use them unless there is a potential conflict. The following examples show these concepts:

Example data valueFormatDate or time interpreted (displayed as MM/dd/yyyy or HH:mm:ss)

month12day30year2010

'month'MM'day'dd'year'yyyy

12/30/2010

30/12/2010

ddMMyyyy

12/30/2010

Time:18hr6min3sec

'Time:'h'hr'm'min's'sec'

18:06:03

18:6:3

HH:m:s

18:06:03

Locales

Locales are important because they determine the valid data values for the long representations of some of the date formats in the table above. For example, the value November is only interpreted correctly for MMMM if the locale is an English-language locale. In some cases, if the format string doesn't use any long representations, the locale is irrelevant for interpreting the date, but the locale may affect the interpretation of AM and PM designators. If no AM or PM designators are specified, the default AM and PM designators for the locale are used.

Locales do not affect the formats used to create format strings. For example, the character M (or MM, MMM, MMMM) represents months regardless of the locale. The following examples illustrate how the locale is used to interpret dates:

Data valueFormat stringLocaleDate interpreted (MM/dd/yyyy)

November 30, 2010

MMMM dd, yyyy

English (United States)

11/30/2010

Noviembre 30, 2010

MMMM dd, yyyy

Spanish (Spain)

11/30/2010

Mon, Feb 22, 2010

ddd, MMM dd, yyyy

English (United States)

2/22/2010

30/12/2010

dd/M/yyyy

All locales

12/30/2010

Related topics