Description

The DateFormatter takes an attribute containing a date in a format recognised by the transformer and converts it to a different format specified by the user.

The attached workspace shows an example use of the DateFormatter transformer.

In this example, a number of Date attributes are created with various source values including one blank value, two invalid values and a number of relative values. The DateFormatter reformats each one into a valid date if it recognizes the source format. If no source data is provided then it returns today's date.

Workspace Screenshot

User-added image

Above: The workspace as a whole is very simple.


User-added image
Above: The AttributeCreator can even set a date to "Next Thursday"...

User-added image


Above: ...which the DateFormatter interprets as 14-Jul-2011 (which is indeed next Thursday - or was at the time this screenshot was taken).  Also notice the two invalid dates.