Functions that process date time items use a customized version of the .NET DateTime data type to enable the handling of incomplete date time fields. In the descriptions of functions, this customized data type is called PFDateTime.
To handle incomplete date time fields (where at least one part of the date time field has the value UNK, for UNKNOWN), date time fields are normalized. Normalization makes sure that UNK date parts have no effect on date computations or comparisons by setting the unknown part of all dates that are involved in the computation to a neutral value. Normalization is performed by all functions that perform date time comparisons or calculations.
During normalization:
The default template used in date time functions is 2000-01-01-12:00:00 (Year-Month-Day-Hour-Minute-Second). If you need to perform date time calculations that use a different template for normalization, you can use the _NormalizeDate functions to specify a custom template.
The following examples use the default template of 2000-01-01-12:00:00.
Examples of date time normalization
Date time type |
Before normalization |
After normalization |
---|---|---|
One date time field |
2007-04-UNK-16:20:UNK |
2007-04-01-16:20:00 |
Two date time fields with same UNK date time part |
07:22:UNK 15:14:UNK |
07:22:00 15:14:00 |
Two date time fields with different UNK date time parts |
2006-12-UNK 2007-UNK-15 |
2006-01-01-12:00:00 2007-01-01-12:00:00 |
Copyright © 2013, 2016 Oracle and/or its affiliates. All rights reserved.