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.

SettingDescriptionExample FormatExample Formatted Date String
dateFormatConfig used when just date values are displayedyyyy-MMM-dd2021-Jan-01
dateTimeFormatConfig used when a datetime string with no seconds is displayedyyyy-MMM-dd HH:mm2021-Jan-01 13:56
dateTimeSecondsFormatConfig used when a full datetime string with seconds is displayedyyyy-MMM-dd HH:mm:ss.SSS2021-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.

$label.name