Skip to main content
Released

Add null support in DateTimeConverter

Related products:FME Form

mathieu_ambrosy
Contributor

I have many entities with DATE attributes.
When I have no value, I set them to null (NullAttributeMapper).

But DateTimeConverter generates a WARN for each null value and rejects entities, so the logfile is very big and its very slow.

I would like a parameter to ignore null values in DATE attributes (don't log them) and maybe a new output port for null values in DateTimeConverter.

<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

arnold_bijlsma
Enthusiast
Forum|alt.badge.img+14

This is definitely needed. Funnily enough the @DateTimeParse built-in function handles Null values fine. One workaround is to use an AttributeManager, and do a @DateTimeParse for every date field:

'


tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • June 25, 2018

See this for info on dealing with different date formats in the same attribute.

https://knowledge.safe.com/questions/72948/convert-different-date-formats-in-same-attribute.html

What about missing or empty values?


Forum|alt.badge.img+1

Appreciate the work around suggestion. Is there a timeline on when this would be added? I'm using 2018.1 (build 18520) and the DateTimeConverter still doesn't handle nulls.


Forum|alt.badge.img+1

Appreciate the work around suggestion. Is there a timeline on when this would be added? I'm using 2018.1 (build 18520) and the DateTimeConverter still doesn't handle nulls.


fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • August 8, 2018
Team is working on an update here. Will be in 2019 betas shortly. Have requested backport to a future 2018.1 update. We'll post here when things come out of the oven

 

 


revesz
Contributor
Forum|alt.badge.img+15
  • Contributor
  • August 14, 2018
Great tip, saved me some time. Thanks a lot.

arnold_bijlsma
Enthusiast
Forum|alt.badge.img+14

In FME 2019.0, this is now fixed by an additional parameter on the DateTimeConverter transformer.

'

'


Forum|alt.badge.img+1

@arnold_bijlsma I tried this but it outputs all null columns

Does the input attribute need to be in an FME format?


mark2atsafe
Safer
Forum|alt.badge.img+44

The transformer expects input to be in an FME format by default, but you can change that in the Input Format parameter. So you should set the input format there and then the transformer will be able to decode and convert the attribute. If the date format cannot be identified then the feature will emerge from the Rejected port and the date set to null.


mark2atsafe
Safer
Forum|alt.badge.img+44

Thanks for mentioning that. I've set the idea status to Released to reflect the new capability's release.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings