Specifying a Standard Date Format
There are three siteConfig settings that let you choose a standard date format in XNAT wherever dates are displayed. Each of these settings uses the Java SimpleDateFormat syntax.
Setting | Description | Example Format | Example Formatted Date String |
---|---|---|---|
dateFormat | Config used when just date values are displayed | yyyy-MMM-dd | 2021-Jan-01 |
dateTimeFormat | Config used when a datetime string with no seconds is displayed | yyyy-MMM-dd HH:mm | 2021-Jan-01 13:56 |
dateTimeSecondsFormat | Config used when a full datetime string with seconds is displayed | yyyy-MMM-dd HH:mm:ss.SSS | 2021-Jan-01 13:56:45.976 |
These can be set individually through the Site Config API, or you can use the Admin UI panel available under "Appearance" to set these formatting preferences.