Skip to main content

we are ingesting data from oracle and it has timestamp format as mm/dd/yyyy hh🇲🇲ss AM/PM, while ingesting through streamsets its taking as yyyy-mm-dd hh🇲🇲ss. 

how to change the timestamp format to source format which is mm/dd/yyyy hh🇲🇲ss AM/PM in streamsets

reformatting the question : converting timestamp to mm/dd/yyyy hh🇲🇲ss AM/PM format through streamsets


@harshith I have not tried datetime data from oracle before to understand why it is changing. But for this case, you would want to try using ‘Expression Evaluator’ to get the required formatted datetime as string and then use field type converter to change it to the target data type. 

 

 

Refer to the supported functions and its examples here https://docs.streamsets.com/portal/datacollector/latest/help/datacollector/UserGuide/Expression_Language/Functions.html?hl=extractstringfromdate.  Hope this helps.


In fact you can also try directly covert the field to datetime and required format without an expression evaluator. Try as below and let us know if it works.

 

 


Reply