PDA

View Full Version : date problem with Kettle



kettle_anonymous
04-04-2006, 12:32 AM
Good morning,


I'm loading and excel file and I'm specifying the type as a date but Kettle returns to me always the same value 1970/01/01 instead of
20041231
20041231
20051024
20060331
20060329
20060329



The format is yyyymmdd.



If anybody has a clue.



Thanks a lot



Nicolas de Fontenay

MattCasters
04-04-2006, 12:43 AM
Hi Nicolas,


Kettle found a number or a string in the excel sheet and tried to do a conversion on it.
Try to look in the excel sheet and see if it's really a date, rather then a number or a string.



In release 2.3.0 (due in less then a month) we'll have conversion logic for Excel as well.



At the moment the work-around is to read it in as a String and do the conversion yourself using a small piece of javascript:



field.str2dat("yyyyMMdd");



Thanks for your patience,
Matt