Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show link automatically by date 1

Status
Not open for further replies.

oaklandar

Technical User
Feb 12, 2004
246
US
Anyway to make a link appear on my Cold Fusion page at 12:00 January 8th Saturday morning and then another link showing up at 12:00 January 9th Sunday morning?


Right now I have no links on my page and want a new link to automatically show up on Saturday morning and then another one on Sunday morning.

Please advise if I am doing this correct?
Code:
<cfif #DayOfYear(Now())# eq 8>  <!--- 8th day of year is Saturday Jan 8th  --->
<a href="http//:mylinkhere.cfm">Saturday Link</a>
</cfif>

<cfif #DayOfYear(Now())# eq 9>
<!--- 9th day of year is Sunday Jan 9th --->

<a href="http//:mylinkhere2.cfm">Sunday Link</a>
</cfif>

 
this should work

Code:
<cfif dateformat(now(), "mm/dd/yyyy" eq "01/08/2005>
<a href="http//:mylinkhere.cfm">Saturday Link</a>
</cfif>

<cfif dateformat(now(), "mm/dd/yyyy" eq "01/09/2005">
<a href="http//:mylinkhere2.cfm">Sunday Link</a>
</cfif>

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Crap. Type-o's

Code:
<cfif dateformat(now(), "mm/dd/yyyy") eq "01/08/2005">
<a href="http//:mylinkhere.cfm">Saturday Link</a>
</cfif>

<cfif dateformat(now(), "mm/dd/yyyy") eq "01/09/2005">
<a href="http//:mylinkhere2.cfm">Sunday Link</a>
</cfif>

[/code

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. 
[b]-Douglas Adams (1952-2001)[/b]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top