Ashley,

try adding "-mapFieldType DateTime=String". See https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-mapFieldType

You won't get a ISO datetime but the historical format used by OGR: "YYYY/MM/DD HH:MM:SS"

Even

Le 17/06/2022 à 16:51, Ashley Mort via gdal-dev a écrit :

We are using GDAL 3.4.1 to convert GeoJSON to ESRI Shapefile with ogr2ogr.  Our source data has a datetime field with content like “2022-07-09T23:59:59.000000Z” and in the resultant Shapefile it shows up as 7/9/2002.

Is there a way to get the ISO datetime into the Shapefile as a string instead of the truncated date?

Thanks!

Ashley Mort

Sr. Software Engineer

972-638-6317 office

814-571-3039 cell


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to