Skip to main content

Hi,

I'm merging a DGN file with excel table writing into a SHP (feature type definition 'import from Dataset' - I used a template given to me)

The excel table contains date, I've used DateFormater- DestinationDateFormat: %d"/"%m"/"%Y, it looks like it should work and it is working when I run the workspace redirected for FME Data Inspector, dated are coming up perfect, fields with no no date have <missing> instead.

When I view the SHP in Data Inspector as to 'open a dataset in a new view' dates are missing as they are missing when I view in in ArcGIS.

How to make it the date viable?

I've tried the FeatureWriter, dynamic properties and used the template .shp a s schema definition, that doesn't work either.

Would anybody have any idea why the date is so difficult to write into a SHP? I use FME Desktop 2016.1.3.

Would the proper XML workspace exported from GDB help? There is a .shp.xml given to me within the shapefile template anyway.

Kamila

I have run into this many times as well. I use this website as a reference which says the date format should be in yyyy-mm-dd.


Hi @sliwkak ,

I think i have to look up dateformat directives everytime. they seem to fight back. Depending on your system region setting in your computer. the Automatic detection will favour that date format on the read. i notice you had some "" marks in your destination format. if you are writing to a date type field it will expect system style date. and those will be forced in as strings and fight back.

David is correct the Esri docs say they want yyyy-mm-dd but if you hard code that the field will have missing field values. I suggest setting it to FME Date (%Y%m%d) [whoops big Y edited 🙂 ] which appears like YYYYMMDD in data Inspector but will land in your shapefile date type field.

also please note my region based datetokens are becoming strange using Auto, and reading dates which are not like the region my system expects.

Oh @Shapefile sometimes you do worry me. Good luck tell us how you get on.


Hi @sliwkak

In addition to the above answers, could you try key-in a date manually from ArcMap?

Thanks.


Hi @sliwkak, FME handles a date/time value as a character string while translating, and most FME writers (including ESRISHAPE) automatically converts a date/time string with the FME Standard Date/Time Format to an appropriate data/time format specific to the destination data format when writing it into a date/time type field defined in the destination writer feature type. Therefore, you don't need to care about date format specific to the Esri specifications and the system region setting in this case. As @scyphers suggested, try formatting the date value with %Y%m%d (i.e. FME standard date format).


Dear @scyphers, @runneals,
gisinnovationsb
and takashi,
thank you all for your time and ideas, by reading it I’ve realized how much I've overdone the date. I should not format that so much, I meant by putting “/”
as that is forced by the shapefile anyway.

I’ve done FME Date (%Y%m%d) setting in DateFormater
as @scyphers suggested and that was it. Thanks again,

Kamila


Reply