Routine code - Converting String to Date - Spreadsheet to table.

Four Stars

Routine code - Converting String to Date - Spreadsheet to table.

I want to convert any date format to a standart date format.
The below list a column data in spread sheet in the form of string. i.e., each row is having different format of date in single column..
Routine has to identify which format it is and then have to convert to any single or standard date format .

JoinDate
-----------------------
EEE MMM dd HH:mm:ss z yyyy"));
"yyyy-MM-dd"
yyyy/MM/dd"
"yyyy.MM.dd"

MM/dd/yyyy
"MM-dd-yyyy
"MM.dd.yyyy"
"dd-MM-yyyy"
"dd/MM/yyyy"
"dd.MM.yyyy"


"M/dd/yyyy"
"dd.M.yyyy"
"M/dd/yyyy hh:mm:ss a"
"dd.M.yyyy hh:mm:ss a"
"dd.MMM.yyyy"
"dd-MMM-yyyy"
"yyyy/dd/MM"

My job design
ExcelMetaData---------->tMap--------------->PostgreSQLOutput

Help would be greatly appreciated.
Thank you in advance.
Community Manager

Re: Routine code - Converting String to Date - Spreadsheet to table.

Hi
Take a look at the below topic, I show an sample expression to identify the date format first, and then convert the string to a date.
http://www.talendforge.org/forum/viewtopic.php?id=34068
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business