Date Settings
This configuration should cover over 90% of the use cases for Date Formatting in DCM. Exceptions are Grid Export, Reports, etc., because it can't use JS Date Format to render on the backend.
By default, this configuration is based on Language localization settings (Setup → Localization → Date Settings), and if your solution uses multiple languages, different users will have different date formatting. But if your solution has to use fixed standards of date formatting, use the ExtJS format.
These settings are saved on the DCM Registry and can be modified using this UI or right on the Registry.
EcxUtils5.Date utility API
Method | Setting Name | Description | Default Value |
---|---|---|---|
isDynamicDateTimeEnabled | Dynamic DateTime | Use conditional DateTime formats related to date value | Enable |
formatHumanizedDuration(duration, addAgo) | Dynamic DateTime | Used in Case Notes and Page Builder. | - |
formatDynamicDate(date, raw=false) | Dynamic DateTime | For Created/Modified grid columns. | For the current day: H:i |
formatDateTime(date) | DCM DateTime - Standard | Used for System Grid Columns: Created On, Modified On, etc | Moment: L LT ExtJs: d/m/Y H:i |
formatDateTimeExtended(date) | DCM DateTime - Extended | Format with seconds. Used for Log Gird Columns: Case History, System Monitor, Queue Monitor, etc | M: L LTS |
formatDateTimeLong(date) | DCM DateTime - Long | Used for Detail Info, Summary Fields, etc | M: LLL E: d F Y H:i |
formatDateTimeFull(date) | DCM DateTime - Full | Used in Tooltips for other dates | M: LLLL Z E: l, d F Y H:i P |
formatDate(date) | Default Date - | Used for dates without time like Date of Birth | M: LT |
getExtDefaultFormat() | Default Date - Ext Date | For overrides: Ext.Date.defaultFormat, Ext.util.Format.dateFormat, Ext.grid.PropertyColumnModel, Ext.grid.DateColumn | Ext Locale |
getExtFieldDateFormat() | Date Field - Display | For overrides Ext.form.field.Date and Ext.picker.Date | Ext Locale |
getExtFieldAltDateFormat() | Date Field - Alternate Formats | For override Ext.form.field.Date | Ext Locale |
getExtFieldTimeFormat | Time Field - Display | For override Ext.form.field.Time | Ext Locale |
getExtFieldAltTimeFormat | Time Field - Alternate Formats | For override Ext.form.field.Time | Ext Locale |
getExtFieldDateTimeFormat | Display Time Field - Display | For ecx-datetimefield | Date + Time formats |
Localization Examples
DateTime Format | English (US) | German |
---|---|---|
Moment: L LT (default) | 02/19/2020 11:34 PM | 19.02.2020 23:34 |
Moment: DD/MM/YYY HH:mm (custom) | 02/19/2020 23:34 | 02/19/2020 23:34 |
ExtJs: d/m/Y H:i (default) | 02/19/2020 23:34 | 02/19/2020 23:34 |
Date and Time Format | English (US) | German |
---|---|---|
Default from date ExtJs Locale | 02/19/2020 | 19.02.2020 |
Custom date: d/m/Y | 02/19/2020 | 02/19/2020 |
Default date + time formats: m/d/Y g:I A | 02/19/2020 10:45 AM | |
Default from time ExtJS Locale: g:i A | 10:45 AM |