0

I have a string "20171110" and I want this to be converted to Date format yyyy-mm-dd of date datatype in Pentaho Data Integration. I tried using select values and calculator but nothing worked. Please suggest.

sneha
  • 169
  • 1
  • 4
  • 11
  • A date field doesn't have a format. But if you need the string representation of the date in yyyy-mm-dd format, then you can cast the string to a date (format yyyymmdd), and then cast it back to a string in format yyyy-mm-dd. – matthiash Nov 21 '17 at 21:45

1 Answers1

0

First, change the String field into date type by using Select values (Metadata Tab). In this case, we use yyyyMMdd as a date format.

After that, drop the 2nd Select values to migrate yyyyMMdd format into yyyy-mm-dd.

And see the result