On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.
Help with simple IF Then statement
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!
<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!
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax