Converting date from one format to another format.

One Star

Converting date from one format to another format.

Hi Experts,
I have date format: 01/09/2013 like this and it should be changed to like this 01-Sept-2013.
How can i achieve this?
Please provide me solution with Scenario.
With Regards,
Viswanath.Ch.
Moderator

Re: Converting date from one format to another format.

Hi,
Is your input source data type "Date" or "String". If former, you can just change date format from "dd/MM/yyyy" to "dd-MMM-yyyy" in tMap.
See my screenshot
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Converting date from one format to another format.

Hi Sabrina,
Thanks for reply.
With Regards,
Viswanath.Ch.
One Star

Re: Converting date from one format to another format.

Hi,
I have the same (to somw extent) situation, but:
tFileInputXML (date in YYYY-MM-DD format) -> tMap -> tFileOutputPositional (must be in DD-MM-YY)
Could you suggest the best way to do so?
If I just use the method described above the transformation becomes quite wierd: 2016-08-22  -> 361-12-16
One Star

Re: Converting date from one format to another format.

@akulkos, use the date pattern "yyyy-MM-dd" instead of "YYYY-MM-DD" (same for output, "dd-MM-yyyy").
Should work.
TRF
One Star

Re: Converting date from one format to another format.

Hello @akulkos,
you can also used anther component named 'tConvertType'.
Regards,
Jerry
Four Stars

Re: Converting date from one format to another format.

What if my input & output dates are strings?

I want to convert from "2019-01-10T06:35:00-04:00" to "20190110063500"(YYYYMMDDHHMMSS)

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads