When running strings through the Field Type Converter, going from string to date, if the string value is null the resultant date value is 1/1/1970. I would expect the date to also be null. Why am I not receiving a null output? Are dates not capable of being null?
Hi
That's something common in Java, when creating a Date from a null input, it will be created with the default value which is the beginning of the linux epoch (1/1/1970).
You can use a stream selector to avoid the records containing a null date.
Thanks
Using a stream selector doesn’t work well. There are more than one date that needs conversion. To accomplish the task using the suggested work around I would need a type converter stage for each date, each with a stream splitter for bypassing the converter logic. Obviously I will need to figure something out for now, but for the future it might be good to add an option to the type converter to allow null values to pass through.
Recent evidence has prompted me to add onto this post. I have evidence that null value is NOT being converted to 1/1/1970, rather the date is simply how the UI displays the null value. Still not ideal from the standpoint of being able to visualize what is happening in the pipeline, but it is nice to know that underneath the covers I still have a null.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.