0

I have a timestamp field in my input table like this: yyyy-mm-dd hh24:mm:dd, I want output sting like this: yyyymmdd.

  • what format are you outputting to? – Tom V Jun 26 '15 at 9:45
  • output should be string like as YYYYMMDD – Lilantha Lakmal Jun 26 '15 at 10:57
1

Just use the select values step. Convert the data type to a string and specify the mask:

yyyyMMdd

Note the mask is a java simpleDateFormat and you can google that for more details. It is case SENSITIVE.

The mask in PDI is only used for 3 things:

  1. Converting from the real data type to a string
  2. Display purposes when previewing data
  3. Any other time you convert to "text" i.e. CSV output, or bulk loaders.

If you are sending it to a target database as a timestamp then it will be whatever that target database uses as default format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.