Date parsing formats |
Date display formats |
Formats reference |
Date parsing defines how LabKey interprets user-entered dates, to store the date value.
It allows to define two parsing formats:
Example:
There are dates which could be ambiguous.
If user enters "10-4-80" or "10/4/80", it will be interpreted in different forms depending on the parsing format set:
Parsing Format | Date stored |
US parsing | 4th October 1980 |
Non-Us parsing | 10th April 1980 |
Date parsing format can only be set globally, at site level by a site admin, and affects all the projects.
Note:
LabKey date parser does not recognize time-only entered strings.
This means that you need to enter a full date string even when you wish to display time only.
For example, you might enter a value of "2/2/09 4:00 PM" in order to display "04 PM" when using the format string "hh aa".
Date display defines how LabKey shows dates in views, independently of the format used to enter the date.
Example:
If user enters "25-5-15 13:05", it will be shown in different ways depending on the display format set:
Display Format String | Date displayed |
dd-MMM-yyyy HH:mm | 25-May-2015 13:05 |
dd-MM-yyyy HH:mm | 25-05-2015 13:05 |
d-M-yyyy H:m | 25-5-2015 13:5 |
dd-MMM-yyyy hh:mm a | 25-May-2015 01:05 PM |
Date display format can be set at several levels:
Attention!!
Display formats have no effect when editing dates. In edit form, the dates are always shown with format yyyy-MM-dd HH:mm, but need to be entered in parsing format.
See the LabKey documentation page Date and Number Formats Reference.