p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   Show Images from Start Date thru Date (http://p2p.wrox.com/showthread.php?t=68309)

istcomnet May 22nd, 2008 12:16 PM

Show Images from Start Date thru Date
 
Hello there,

I am trying to show picture from from start date thru end date that I want.

Example:

IF From date 01/01 (MM/DD) thru 01/15 show "image1.jpg"
From date 02/01 thru 02/14 show "image2.jpg"
else show "image.jpg"

The pictures will repeat like this every year. Please help!! :(

Thank you. :)


mat41 May 22nd, 2008 08:16 PM

Provided I have understodd your question this should do it:

<img src="Images/image<% if date() >= cdate("01/01/" & year(date())) AND date() <= cdate("01/15/" & year(date())) then %>1<% end if %>.gif" alt="" border="0">

Wind is your friend
Matt
www.elitemarquees.com.au

istcomnet May 23rd, 2008 07:12 AM

[:0] Its work!! This is what I need!!!

Thank you very mush, mat41! [8D]



All times are GMT -4. The time now is 02:39 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.