Summary
This article covers Partial Dates.
A partial date is a date, which one or multiple fields are allowed to be declared unknown. Partial dates can contain both date and time fields. A partial date field component can be the year, the month, the day of month, the hour of day, the minute, the second, or the millisecond.
Note: Partial Dates do not support 12-hours time formats. Hours can be specified in 24 hour format only.
If a field allows a value “unknown”, then the code for the unknown value has to be specified in square brackets behind the date format code for the field.
Example: When a date should consist of a month and a year and the month should support unknown values and the unknown code should be “UNK”, then the date format could look like this: MMM[UNK]-yyyy. A question with this date format would accept all valid three character month codes, and the “UNK” string, when the month is not known. The following values would be accepted for such a partial date question: “Jan-2000″, “Feb-2001″, “UNK-2002″.
It is possible to allow the unknown field for every single field. Example: yyyy[????]-MM[??]-dd[??].
When an unknown value is allowed for a field, then all lower level fields need to allow an unknown value too. This means that the following format is valid: yyyy-MM[]-dd[], while this format is not valid: yyyy-MM[]-dd. When the month allows unknown values, then the day needs to have an unknown value too.
The system does not allow invalid partial dates to be entered. This requires that the format alert for the question is very descriptive in order for the user to know why a partial date is not accepted.
Partial Dates and Dependencies
Partial date dependencies are similar to date dependencies. Comparing partial dates will work top-down from year to the millisecond. When, during a comparison, a field is checked that is unknown for a field the comparison stops at that level.
The comparison behavior is one of the most important things to know about partial dates. Keep in mind:
- A partial date that is not empty, but completely unknown, will be equal to any other not-empty partial date.
- When a partial date has only a year set, then it is equal to any other partial date that has the same year set.
- The comparison of partial dates is not transitive. If A==B and B==C, this does not mean that A==C. Example: A=Jan/2000, B=2000, C=Feb/2000.
Note: The output of Partial Dates do not follow the autoCorrectDateFormat property and scripts cannot be used to change the month fields to upper case.
Need more help?
Please visit the Fountayn Contact Information page.