<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">Jay,<br><br>It looks like you may have borrowed some code from the SLP guys. They have their dates encoded using an integer format: YYMMDDHHMISS (or something dead similar).<br><br>That's why their code works. Right now Mapserver cannot do the date comparison, but GeoMOOSE can reformat dates into integers and Mapserver CAN do the integer comparison.<br><br>-Duck<br><br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Jim Klassen <Jim.Klassen@ci.stpaul.mn.us><br>To: jkapalczynski@ci.maple-grove.mn.us; geomoose-developers@lists.sourceforge.net; geomoose-users@lists.sourceforge.net<br>Sent: Tuesday, February 12, 2008 9:54:14 AM<br>Subject: Re:
[Geomoose-users] EXPRESSIONS<br><br>
I
don't
think
you
can
do
date/time
comparisons
using
CGI
Mapserver.
I<br>think
it
is
just
treating
the
date
as
a
string.<br><br>One
thing
you
could
do
is
add
a
field
to
the
DBF
file
that
stores
the<br>date
as
an
integer
encoded
as
the
number
of
days
past
a
certain
time<br>(say
Jan
1
2000)
and
then
you
could
use
the
integer
comparison
methods.<br>If
you
regenerate
the
file
often,
you
could
just
have
the
extra
column<br>be
the
number
of
days
old
the
record
is
and
not
have
to
pass
in
the<br>extra
parameter.<br><br>I
think
this
is
where
most
people
suggest
going
to
a
database
driven<br>(PostGIS)
data
source
so
you
can
use
a
select
statement
to
calculate
the<br>extra
column
on
the
fly.<br><br>>>>
"Jay
Kapalczynski"
<<a ymailto="mailto:jkapalczynski@ci.maple-grove.mn.us" href="mailto:jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>>
02/12/08<br>9:35
AM
>>><br>I
narrowed
the
expression
down
a
bit
and
got
it
to
work....<br><br> <br><br>
CLASS<br><br>
NAME
'Last
Week'<br><br>
EXPRESSION
('[Geo_Simple]'
=<br>'BURGLARY')<br><br>
COLOR
197
0
255<br><br>
SYMBOL
"star"<br><br>
SIZE
12<br><br>
END<br><br> <br><br>So
the
problem
is
with
the
End
of
the
Expression
and
how
it
is
trying
to<br>calculate
dates
for
"LAST
WEEK"
,
"LAST
TWO
WEEKS"
etc.....<br><br> <br><br>The
.map
file
is
correct
minus
the
Time/Date
and
the
.xml
is<br>correct....the
points
show
up...I
need
the
date
thing
to
work<br><br> <br><br>What
code
am
I
missing
to
calculate
the
date
range....or
where
that<br>would
be
coded?<br><br> <br><br>Any
thoughts...<br><br> <br><br> <br><br>From:
Jay
Kapalczynski <br>Sent:
Tuesday,
February
12,
2008
8:44
AM<br>To:
'<a ymailto="mailto:geomoose-users@lists.sourceforge.net" href="mailto:geomoose-users@lists.sourceforge.net">geomoose-users@lists.sourceforge.net</a>';<br><a ymailto="mailto:geomoose-developers@lists.sourceforge.net" href="mailto:geomoose-developers@lists.sourceforge.net">geomoose-developers@lists.sourceforge.net</a><br>Subject:
EXPRESSIONS<br><br> <br><br> <br><br>I
have
been
messing
around
with
Expressions
and
cant
seem
to
get
it<br>right...I
am
missing
something<br><br> <br><br>If
I
eliminate
the
red
line
below
the
Symbols
appear
on
the
map...so
I<br>can
assume
that
the
problem
is
with
the
Expression<br><br> <br><br>My
shapefile
has
the
two
fields
below<br><br> <br><br>Geo_Simple
=
Text
field
with
"BURGLARY"
as
the
value
for
all
records<br><br> <br><br>Geo_Time
=
Date
Field
in
this
format..."2/8/2008"<br><br> <br><br>DOES
ANYONE
know
why
the
expression
is
not
working....Is
there
some
code<br>that
I
am
missing???????<br><br> <br><br>Am
I
missing
the
reference
to
the
%LASTWEEK%????????????<br><br> <br><br>THANKS<br><br> <br><br> <br><br>IN
THE
"Burglaries_8bit.map"
FILE<br><br> <br><br>
LAYER<br><br>
NAME
'BURGLARIES'<br><br>
DATA
'./Burglaries.shp'<br><br>
TYPE
POINT<br><br>
STATUS
DEFAULT<br><br> <br><br>
CLASS<br><br>
NAME
'Last
Week'<br><br>
EXPRESSION
('[Geo_Simple]'
=<br>'BURGLARY'
AND
'[Geo_Time]'
>
'%LASTWEEK%')<br><br>
COLOR
197
0
255<br><br>
SYMBOL
"star"<br><br>
SIZE
12<br><br>
END
<br><br> <br><br>
HEADER
'header.xml'<br><br>
TEMPLATE
'record.xml'<br><br>
FOOTER
'footer.xml'<br><br> <br><br>
END<br><br>END
##
end
Map<br><br> <br><br> <br><br> <br><br>IN
THE
XML
FILE<br><br> <br><br>
<map
title="BURGLARIES"
default="true"
reference="false"<br>popups="false"
data="false"><br><br>
<param
type="today"
offset="-7"
name="LASTWEEK"<br>format="%2Y%2M%2D000000"/><br><br>
<param
type="today"
offset="-14"
name="LASTTWOWEEKS"<br>format="%2Y%2M%2D000000"/><br><br>
<param
type="today"
offset="-30"
name="LASTTHIRTY"<br>format="%2Y%2M%2D000000"/><br><br>
<param
type="today"
offset="-90"
name="LASTNINTY"<br>format="%2Y%2M%2D000000"/><br><br> <br><file>/ms4w/apps/GeoMOOSE/maps_statedemo/Burglaries/Burglaries_8bit.map<<br>/file><br><br>
</map><br><br> <br><br> <br><br> <br><br>WITH
THE
EXPRESSION:<br><br> <br><br> <br><br> <br><br>WITHOUT
THE
EXPRESSION:<br><br> <br><br> <br><br><br><br>-------------------------------------------------------------------------<br>This
<a target="_blank" href="http://SF.net">SF.net</a>
email
is
sponsored
by:
Microsoft<br>Defy
all
challenges.
Microsoft(R)
Visual
Studio
2008.<br><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a><br>_______________________________________________<br>Geomoose-users
mailing
list<br><a ymailto="mailto:Geomoose-users@lists.sourceforge.net" href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br></div><br></div></div><br>
<hr size=1>Never miss a thing. <a href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"> Make Yahoo your homepage.</a>
</body></html>