Reading Date fields

Generally speaking, when a Date field is created, you have to specify the format so PDI can recognize in the values the different components of the date. There are several formats that may be defined for a date, all of the combinations of letters that represent date or time components.

These format conventions are not PDI-specific but Java standard.

The following table shows the main letters used for specifying date formats:

Letter

Meaning

y

Year

M

Month

d

Day

H

Hour (0 - 23)

m

Minutes

s

Seconds

As an example, the first field in our sales file, ORDERDATE, corresponds to a date. If we look at the first value, 2/20/2004, it's clear that we have the month, then the day, and then ...

Get Learning Pentaho Data Integration 8 CE - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.