Skip to main content
Question

Date Format

  • November 14, 2013
  • 3 replies
  • 37 views

Hi,

 

 

 

I’ve got SMW 4 source data that has multiple attributes that contain Date values that I’m importing to an ESRI File Geodatabase. (Not all attributes contain information, some have unset values). Using the DateFormatter on the values that do have information, it works; but when I include all records, I’m getting the following error message:

 

 

 

The date 'unset' is not valid. Valid forms for a date type are YYYYMMDD, YYYYMMDDHHMMSS, or HHMMSS

 

 

 

Is this error because I’m using the DateFormatter? Is there a way to pass the date with the correct format and not expect there to be a value in every field?

 

 

 

Thanks in advance!

 

david_r
Evangelist
  • November 14, 2013
Hi,

 

 

could it be that you have one or several features where the value for the date column isn't a date, but the string "unset"? If so, you could use a Tester to isolate them.

 

 

If you want to replace "unset" with a NULL (empty) date field, send them through an AttributeRemover to remove the date attribute before the Writer. There is also a TimeStamper if you just want to replace them with today's date.

 

 

David

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 14, 2013
Hi,

 

 

I Agree with David, the "unset"value in the date field throws off the date formatting.

 

As suggested test for the value and possibly replace it with the NullAttributeReplacer.

 

 

Itay

  • November 14, 2013
Thanks gentlemen,

 

 

The source format is a string. I'll give your idea a go.

 

 

Regards

Reply


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