Skip to main content

Good morning i have been
having a perplexing issue when writing a date to tab and shape.
(FME 2015.1.1.0 build 15515, date formatter version 3)

From my source data my date
is coming though as a string YYYYMMDDHHSSSSSS and using the date formatter it’s
a simple matter to turn the date into YYYY-MM-DD.

I check It is changing the
date correcting via an inspector on the formatter and it is writing correctly.

The issue is that when I write
to a shape or tab output with the field type to set to date the data will not
write correctly, Ie I get a null attribute.

If I write the date YYYYMMDD
then the attribute is written correctly.

If I change the shape table
field type to char then the YYYY-MM-DD then the date is written correctly.

This is very perplexing…

Cheers

Q

FME treats date values as character strings while translating, and usually FME writers translate a date string with FME Standard Date format i.e. YYYYMMDD into the appropriate date type value in the destination data format automatically. You don't need format the date value to a specific format (e.g. YYYYY-MM-DD) before writing.


Just to add to @takashi's comment: I believe, TAB and Shape will display dates in system locale format.

 


verify that your field into shp (or TAB) file has "char" format (and not has a "date" format)


Reply