Skip to main content
Solved

When writing FME DateTime to ESRI FGDB How can I retain midnight times?

  • October 9, 2019
  • 7 replies
  • 153 views

rob_m_esriuk
Contributor
Forum|alt.badge.img+6

I have a workbench which builds FME date time attributes and writes them to ESRI FGDB Classes. So, for 20191009115225 I get 09/10/2019 11:52:25 however if the time is midnight the fme date is 20191009000000 and the FGDB field contains 09/10/2019. How do I get this field to retain the 00:00:00 values?

Best answer by mark2atsafe

So... it appears to be a known limitation that 00:00:00 in Geodatabase represents "no time". So I don't think it's going to be possible to retain a meaningful midnight value!

I don't think it supports fractions of a second either, so the best you could do is add a second to make it 00:00:01, using the DateTimeCalculator transformer.

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.

7 replies

rob_m_esriuk
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 26 replies
  • October 9, 2019

Using FME 2018.1


rob_m_esriuk
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 26 replies
  • October 15, 2019

I suspect this is a feature of ArcCatalog and the 00:00:00 is just not displayed!


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • October 15, 2019

If you want to be sure FME is writing the midnight time, run the workspace with "Redirect to FME Data Inpsector" (under the writers menu) turned on.

FME will write to the Data Inspector instead of to the database, so you can check the data before the writing.

That will allow you to see what is actually written, before ArcCatalog is displaying it and will allow you to see if the 00:00:00 is written.


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • October 16, 2019

I suspect this is a feature of ArcCatalog and the 00:00:00 is just not displayed!

I'm not so sure about that. I just tried it, read it back with FME, and the time was missing. I think this might be our issue. I'll check with our developers and get back to you. Are you using the full geodatabase writer or the open API one? It was the API one I tried.


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • Best Answer
  • October 16, 2019

So... it appears to be a known limitation that 00:00:00 in Geodatabase represents "no time". So I don't think it's going to be possible to retain a meaningful midnight value!

I don't think it supports fractions of a second either, so the best you could do is add a second to make it 00:00:01, using the DateTimeCalculator transformer.


rob_m_esriuk
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 26 replies
  • October 17, 2019

So... it appears to be a known limitation that 00:00:00 in Geodatabase represents "no time". So I don't think it's going to be possible to retain a meaningful midnight value!

I don't think it supports fractions of a second either, so the best you could do is add a second to make it 00:00:01, using the DateTimeCalculator transformer.

I did try fractions of a second and they just disappeared too :) We can live with this as we want the date times in sequence and this will still sort correctly . Eventually we are going directly to Arcgis Online, I will check what happens there as soon as I can


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 17, 2019

I did try fractions of a second and they just disappeared too :) We can live with this as we want the date times in sequence and this will still sort correctly . Eventually we are going directly to Arcgis Online, I will check what happens there as soon as I can

It's an ESRI thing rather than FME. Try and set the time to 00:00:00 directly within the GDB and you won't see the 00:00:00 displayed. It assumes a midnight time if one isn't shown, e.g. if you query for = timestamp '2019-10-09 00:00:00' it will display those records where 00:00:00 isn't displayed