6

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).

enter image description here

  • 1
    What version of PostgreSQL? What version of ArcGIS? What version of ArcSDE? What does 'sdetable -o describe' say the type is? Which date type are you using? – Vince Nov 27 '13 at 17:10
9

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.

| improve this answer | |
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.