Geographic Information Systems Asked by tshiffle on March 27, 2021
I have a postgres database with a series of fields that includes a date field in MM/DD/YYYY format. Through ArcSDE it displays in Arc in a weird format with the wrong date and some made up time.
When viewed via PGAdmin or QGIS the date displays correctly. Does anyone have an idea of why Arc is jumbling the date and how it can be corrected?
The screenshot below shows the attribute table for identical rows in QGIS and Arc. Notice how Arc includes a random time and the wrong date (everything is year 2000).
ArcSDE uses 'struct tm' to pass date fields, so it certainly has the range to support the information. I suspect, however, that you're not using the supported date type (TIMESTAMP WITHOUT ZONE), which is causing the date to get mangled.
Correct answer by Vince on March 27, 2021
ArcGIS supports TIMESTAMP WITHOUT ZONE date type. To convert your column date in PostgreSQL you can alter your column table in the database by:
ALTER TABLE instance_oasis_incident_1_0
ALTER COLUMN incident_date TYPE timestamp
USING incident_date::timestamp;
After such operation, your dates in ArcGIS and QGIS shouldn't be different.
Answered by sk1me on March 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP