Available in:
SM Starter
SM Professional
LIMS Starter
LIMS Enterprise
Biologics LIMS
This topic covers formatting options for formatting the display of dates, times, and numbers within Sample Manager and other similar applications.
Set DateTime, Date, and Time Display Formats
An administrator can configure the way DateTime, Date, and Time field values are displayed in the application. This does not affect how values may be imported, but can be used to standardize or simplify the display to users.
There are three separate format selectors available for dates, date-times, and time-only values, as shown in the image below. For each, you can check the box to
Use Default or select the pattern you prefer.
- Select > Application Settings.
- When the Use Default box is checked, you will be inheriting a default setting.
- Uncheck the box and choose a different Display format for date/date-times/time-only values if desired.
DateTime, Date, and Time Display Options
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 Example |
|---|
| 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 Example |
|---|
| HH:mm:ss | 13:45:15 |
| HH:mm | 13:45 |
| HH:mm:ss.SSS | 13:45:15.000 |
| hh:mm a | 01:45 PM |
Supported Entry Formats
When your site is configured to use Day-Month-Year parsing (as typical outside the U.S.), a typed or pasted date does not need to match the field's configured display format exactly. During import, LabKey checks the entry against a set of accepted formats.
An entry is checked in this order until a match is found:
- The field's own configured display format
- Any other supported Day-Month-Year entry (below)
- Any supported Year-Month-Day entry (below)
- The folder, project, or site display format, if different from the field's own format
Supported Day-Month-Year entries combine:
- Day: two digits, e.g. 02
- Month: two digits, a three-letter abbreviation, or the full name, e.g. 04, Apr, or April
- Year: two or four digits, e.g. 25 or 2025
- Separator: a hyphen, slash, or period, used consistently, e.g. 02-04-2025 or 02/April/2025, not mixed
Year-first entries require a four-digit year, and combine year, month, and day with the same separator options, for example 2025-04-02, 2025/Apr/02, or 2025.April.02.
Any of these entries can also include a time portion, for example 02-04-2025 14:30:00 or 2025/Apr/02 02:30 PM.
An entry that doesn't match any supported format is rejected, including any entry where the day, month, and year are separated by spaces.
Number Format Strings
Format strings for Integer and Decimal 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 |
Examples
The following examples apply to Decimal 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 |
Related Topics