LabKey Server provides flexible display formatting for dates, times, datetimes, and numbers, so you can control how these values are shown to users. Set up formats that apply to the entire site, an entire project, a single folder, or even just to an individual field in one table.
You can customize how dates, times, datetimes, and numbers are displayed on a field-by-field basis, or set these formats on a folder-level, project-level or site-wide basis. The server decides which format to use for a particular field by looking first at the properties for that field. If no display format is set at the field-level, it checks the container tree, starting with the folder then up the folder hierarchy to the site level. In detail, decision process goes as follows:
An admin can set formats at the site level by managing look and feel settings.
An admin can standardize display formats at the project level so they display consistently in the intended scope, which does not need to be consistent with site-wide settings.
An admin can standardize display formats at the folder level so they display consistently in the intended scope, which does not need to be consistent with either project or site settings.
To do this, you edit the properties of the field.
Date, Time, and DateTime display formats are selected from a set of standard options, giving you flexibility for how users will see these values. DateTime fields combine one of each format, with the option of choosing "<none>" as the Time portion.
Date formats available:
Format Selected | Display Result |
---|---|
yyyy-MM-dd | 2024-08-14 |
yyyy-MMM-dd | 2024-Aug-14 |
yyyy-MM | 2024-08 |
dd-MM-yyyy | 14-08-2024 |
dd-MMM-yyyy | 14-Aug-2024 |
dd-MMM-yy | 14-Aug-24 |
ddMMMyyyy | 14Aug2024 |
ddMMMyy | 14Aug24 |
MM/dd/yyyy | 08/14/2024 |
MM-dd-yyyy | 08-14-2024 |
MMMM dd yyyy | August 14 2024 |
Time formats available:
Format Selected | Display Results |
---|---|
HH:mm:ss | 13:45:15 |
HH:mm | 13:45 |
HH:mm:ss.SSS | 13:45:15.000 |
hh:mm a | 01:45 PM |
Format strings for Number (Double) fields must be compatible with the format that the java class DecimalFormat accepts. A valid DecimalFormat is a pattern specifying a prefix, numeric part, and suffix. For more information see the Java documentation. The following table has an abbreviated guide to pattern symbols:
Symbol | Location | Localized? | Meaning |
---|---|---|---|
0 | Number | Yes | Digit |
# | Number | Yes | Digit, zero shows as absent |
. | Number | Yes | Decimal separator or monetary decimal separator |
- | Number | Yes | Minus sign |
, | Number | Yes | Grouping separator |
E | Number | Yes | Exponent for scientific notation, for example: 0.#E0 |
The following examples apply to Number (Double) fields.
Format String | Display Result |
---|---|
<no string> | 85.0 |
0 | 85 |
000 | 085 |
.00 | 85.00 |
000.000 | 085.000 |
000,000 | 085,000 |
-000,000 | -085,000 |
0.#E0 | 8.5E1 |