Previous Topic

Next Topic

Book Contents

Date time processing

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 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

Send Feedback