Skip to main content
Question

Date Format

  • November 14, 2013
  • 3 replies
  • 59 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!

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • 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
Safer
Forum|alt.badge.img+21
  • Safer
  • 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

  • Author
  • November 14, 2013
Thanks gentlemen,

 

 

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

 

 

Regards