<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div dir="auto">
<div dir="auto"><br></div><div dir="auto"><br></div>
<div id="aqm-original" style="color: black;">
<!-- body start -->
<div class="aqm-original-body">
<div style="color: black;">
<p style="color: black; font-size: 10pt; font-family: sans-serif; margin: 8pt 0;">Op 27 juni 2019 23:05:17 schreef Markus Metz <markus.metz.giswork@gmail.com>:</p>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="ltr"><br><br>On Thu, Jun 27, 2019 at 9:27 PM Paulo van Breugel <<a href="mailto:p.vanbreugel@gmail.com">p.vanbreugel@gmail.com</a>> wrote:<br>><br>> Hi devs,<br>><br>> I am trying to import a shapefile using v.in.ogr, filtering on date<br>> using datetime, e.g.,<br>><br>> v.in.ogr input=myshapefile.shp layer=myshapefile output=outputlayer<br>> where="datm_start >= datetime('2019-01-01')"<br>><br>> I am getting the message:<br>><br>> ERROR 1: Undefined function 'datetime' used.<br>> ERROR: Error setting attribute filter 'datm_start >= datetime('2019-01-01')'<br>><br>> Does this mean it is not possible to use functions in v.in.ogr? Or am I<br>> doing somthing wrong?<br><div><br></div><div>The OGR shapefile driver does not support this function. You need to import the shapefile into GRASS, using anything but the dbf driver as database driver (default is sqlite), then try to filter with v.extract where="datm_start >= datetime('2019-01-01')"</div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Ok, thanks, was hoping I could do a selection before to safe on the time ik takes to import. I'll look for a way to filter before import using another tool.</div><div dir="auto"><br></div><div dir="auto"><br></div><div id="aqm-original" style="color: black;" dir="auto"><div class="aqm-original-body"><div style="color: black;"><blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;"><div dir="ltr"><div></div><div><br></div><div>HTH,</div><div><br></div><div>Markus M</div><div><br></div><div>></div>> Running grass gis 7.6, Linux.<br>><br>><br>> Cheers,<br>><br>> Paulo<br>><br>><br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev">https://lists.osgeo.org/mailman/listinfo/grass-dev</a></div>
</blockquote>
</div>
</div>
<!-- body end -->

</div><div dir="auto"><br></div>
</div></body>
</html>