Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Help with simple IF Then statement
iwcnb
I am having a problem writing a simple IF THEN statement that compares a date in the text field to Today's date. I tried using a variable to assign Today's date after the equal operation, but it seems like I am not allow to do that. Here is my script:
<iw_perl><![CDATA[
sub DateTime{
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my $date = sprintf("%2.2d/%2.2d/%4.4d ",$mon+1,$mday,$year+1900);
}
]]></iw_perl>
<iw_if expn='{iw_value name="Headline.Date"/} eq "$date" '>
<iw_then>
<![CDATA[<img src="/images/NewToday.gif" width="1" height="1" border="0" alt="">]]>
</iw_then>
</iw_if>
Is what I am doing correct or I missed something here.
Greatly appreciate if someone can show me a work around.
Thanks!
Find more posts tagged with
Comments
There are no comments yet