[mapserver-users] compare date in class

patruno at istat.it patruno at istat.it
Fri Jun 6 09:05:45 EDT 2008


Hi list!

I'd like to ask you if there is a way to compare a field date (mm-gg-yyyy) coming from a PostGIS query with the current date. (and above all how to get the current date ....)

My goal is to use a point layer with different colours depending on expression result in the 'class' block.

Ex: 
  CONNECTION 'dbname=xxxx user=username password=password host=localhost'

   DATA 'the_geom from (select the_geom, id, oid, ...., start_date  from table) as foo'

.....

CLASS 
   EXPRESSION (current_date > start_date)

NAME "red"
      TEXT ([id])
      STYLE
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
      END
....



Thanks in advance
Vinc

 


More information about the mapserver-users mailing list