<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Ashley,</p>
<p>try adding "-mapFieldType DateTime=String". See
<a class="moz-txt-link-freetext" href="https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-mapFieldType">https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-mapFieldType</a></p>
<p>You won't get a ISO datetime but the historical format used by
OGR: "YYYY/MM/DD HH:MM:SS"<br>
</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 17/06/2022 à 16:51, Ashley Mort via
gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:BN2P110MB1256DCBF3A7177147FBFC304CAAF9@BN2P110MB1256.NAMP110.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there a way to get the ISO datetime into
the Shapefile as a string instead of the truncated date?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ashley Mort<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Sr. Software
Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">972-638-6317
office<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">814-571-3039
cell<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>