Skip to main content
Question

DateFormatter only outputs current date or default value


Forum|alt.badge.img

I am trying to format a source attribute that stores a date value as a single 4-character long year value (1995, 2000, 2005) to be in ISO date format (1995-01-01). However my DateFormatter transformer is only outputting values for the current date or for the default value when it encounters an invalid value (0001-01-01).

Any ideas? I'm lost. See below for pictures describing the problem.

Workbench & DateFormatter transformer

Original dates before being transformed

(The "YEAR" attribute is renamed to "utility_year_of_construction" in between here)

Dates after being transformed

6 replies

david_r
Celebrity
  • October 3, 2017
The pictures aren't showing...

Forum|alt.badge.img
  • Author
  • October 3, 2017
david_r wrote:
The pictures aren't showing...
I was able to copy and paste them into the submission box so I thought they could get uploaded automatically, but they didn't. I just hosted them on imgur and updated the post.

 

 


david_r
Celebrity
  • October 3, 2017

How about just using an AttributeCreator rather than the DateFormatter:


redgeographics
Celebrity
Forum|alt.badge.img+49

Didn't see any pictures, could you post them just to make sure I'm answering the right question :)


Forum|alt.badge.img
  • Author
  • October 3, 2017
david_r wrote:

How about just using an AttributeCreator rather than the DateFormatter:

This seems to have fixed it but this is strange behaviour for the DateFormatter.

 

 


david_r
Celebrity
  • October 3, 2017
iboates wrote:
This seems to have fixed it but this is strange behaviour for the DateFormatter.

 

 

It would help if we could see the pictures...

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