Skip to main content
Datetime again! This time I am having trouble keeping the time in a datetime format in a custom reader with an earthquake feed. (Very topical in NZ today!)  I can parse the date easily and export the field as datetime, but when I try to use it in ArcMap only the date part is kept.

 

 

Debugging so far:

 

I kep the date as a string, saved the feed to a file geodatabase. Converts as expected, then an animated time enabled map works by the hour instead of by the day.

 

 

Inspected the feed by opeining a custom reader in another workspace.

 

The field in recognised as a datetime type, and the contents is a standard FME date yyyymmddhhmmss. Seems OK.

 

 

Export to a file geodatabase but have to call it a "date", however this is supposed to mean datetime for anything other than dBase stuff like sh**e files. Yep ,works ok.

 

 

But the whole point is to be dynamic and use the feed to draw the 'quakes without the static copy.

 

 

Where is the setting I have got wrong, or maybe a bug?

 

 

I would put up the custom reader if I could work out how...

 

http://www.ollivier.co.nz/home/USGSQ.fds

 

so here is a link instead

 

 

BTW the earthquake feed has the depth in a pseudo attribute that shows up in the inspector but not on the reader, I cannot see how to expose dc_subject listed in the properties.
Hi,

 

 

one important thing to pay attention to with date and datetime values when translating between systems, is the difference between a datetime object and a datetime string. The datetime object has an internal storage model that is independent from a configurable on-screen representation, whereas the datetime string is a "dumb" string like any other collection of characters.

 

 

I see that you're using the DateFormatter to format your datetime string so that it will be correctly converted to a datetime object in the writer. However, the DateFormatter isn't always very good at this as it makes a few assumptions on the input format that aren't always correct. Try replacing it with a DateConverter from the FME Store, it will allow you to also specify the input format and, in my experience, works much better.

 

 

David
We actually started with a PythonCaller that did the same as the DateConverter. I took it out thinking that it might have been the problem, but there is no difference, both successfully create a correct string for the output of the custom reader with a datetime datatype. I checked that by using another workbench to read the output of the custom reader.

 

 

I am using the custom reader as an FME connection in ArcMap.

 

 

Some datatype coversions into an in-memory featureclass are working, but the date does not. Must be some Esri code left over from dBase or INFO which does not handle the time part of datetime.

 

 


The custom reader will write to a filegeodatabase with the full datetime if used in another workbench.  But it will not keep the time if being used to write to a dynamic featureclass using the FME Connection.

 

 

Providing a sample date string will not get to the problem. The task is to use a GeoRSS/RSS Feed to load a featureclass and transform the feed into proper typed fields for further analysis.

 

 

eg use this RSS feed:

 

http://earthquake.usgs.gov/earthquakes/catalogs/eqs7day-M2.5.xml

 

Make up a commection and add EntryPoint to the table of contents.

 

It produces around 200 points with two fairly useless text fields.

 

The custom reader is intended to split the fields and reformat into numeric, date and name fields for use in a dynamic display of earthquakes.

 


Hi,

 

 

not sure I really understand the problem. I tested the RSS feed and could successfully convert all the dates into proper File Geodatabase timestamps using the following settings in a DateConverter:

 

 

 

 

No other transformers were necessary.

 

 

David

Reply