[Mapserver-users] Class logical expression - date comparison

Paul Ramsey pramsey at refractions.net
Wed Dec 4 17:01:09 EST 2002


Daniel Morissette wrote:
> Nelson Luna Silvestre wrote:
> 
>>Well, I think that I'll have to add a long integer field on my shapefiles
>>and fill it with the number of days counted from 1-1-1900 to the date in
>>question - it's not a bright solution but will do.
> 
> Simply storing the date in a numeric field in the format YYYYMMDD would
> work as well (e.g. 20021204) and would allow you to use the numeric
> operators.

If you look in the DBF file, you'll see that the DBF "date" type is 
really just an eight character string in the form of YYYYMMDD. It might 
be possible to just recast your EXPRESSION to test against things of 
that form instead of the YYYY-MM-DD you are using in your example.

P.

-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the mapserver-users mailing list