[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] If and the time tag
--- Gurpreet <gurs@sbcglobal.net> wrote:
> Hi,
>
> I have tried the following pieces of code but none
> seem to
> work I would appreciate if someone could help me
> out.
>
> [seti mytime][time]%Y-%m-%d[/time][/seti]
> [if base="item-data products" field=creation_date
> op="=~"
> compare="/[scratch mytime]/"]
> <img src="__IMAGE_DIR__/navigation/new.gif"
> border="0">
> [/if]
>
> [if-item-data products creation_date ==
> '[time]%Y-%m-%d[/time]']
> <img src="__IMAGE_DIR__/navigation/new.gif"
> border="0">
> [/if-item-data]
>
> [if base="item-data products" field=creation_date
> op="=="
> compare="[time]%Y-%m-%d[/time]"]
> <img src="__IMAGE_DIR__/navigation/new.gif"
> border="0">
> [/if]
>
> I have tried using op="==", op="=~", op="eq",
> op=">=". None
> seem to work.
>
> All I am trying to do is show a little "new" sign
> next to
> all articles with today's date.
>
> I would appreciate any help. I tired "googling" the
> icdev
> site for if [time] but nothing to guide me.
>
> Thanks,
> Gurpreet
Is the format for creation_date the same as your
format for mytime (ie. %Y-%m-%d)?
If so, try taking the dashes out of both the formats
so it is just one long number, ie. 20021008. I am not
sure if that would make a difference but its worth a
try if you havent done so already. and then when you
want to show the date, you can use the [convert_date]
tag.
Good Luck,
Tom
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com