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.
5 REPLIES
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