OK, so stop the presses. Candace is stuck on dates again ;)
I have a page where I want to display links for books coming out next
month and through 11 months ahead. I am breaking these down by
month/year using DateADD:
cfscript
month1 = DateFormat(DateAdd(m, +1, Now()), );
month2
?
tony
-Original Message-
From: Candace Cottrell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 7:20 PM
To: CF-Talk
Subject: Dates... again
OK, so stop the presses. Candace is stuck on dates again ;)
I have a page where I want to display links for books coming out next
month
(offsetDate, )#br
/cfoutput
/cfloop
-Original Message-
From: Candace Cottrell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 25 September 2002 11:20 a.m.
To: CF-Talk
Subject: Dates... again
OK, so stop the presses. Candace is stuck on dates again ;)
I have a page
-Original Message-
From: Candace Cottrell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 7:20 PM
To: CF-Talk
Subject: Dates... again
OK, so stop the presses. Candace is stuck on dates again ;)
I have a page where I want to display links for books coming out next
month and through
/cfif
#DateFormat(offsetDate, )#br
/cfoutput
/cfloop
-Original Message-
From: Candace Cottrell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 25 September 2002 11:20 a.m.
To: CF-Talk
Subject: Dates... again
OK, so stop the presses. Candace
Subject: RE: Dates... again
I just want to be sure I am understanding this. What does offset do? I
looked it up in the handy dandy WACK but didnt see anything.
Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293
for next month, 2 for the month after that
Make sense?
-Original Message-
From: Candace Cottrell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 25 September 2002 11:38 a.m.
To: CF-Talk
Subject: RE: Dates... again
I just want to be sure I am understanding this. What does offset do
And here you're saying, if the resulting month is January, print the
heading.
Exactly! Let us know if you have any problems.
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable
Ok, this works for now. I added some looping and here's waht I came up
with:
cfoutput
cfloop index = offset from=0 to=12
cfset offsetDate = DateAdd(m, offset, Now())
cfif offsetDate eq Now()
td width=43% class=nbheader
Fiction #year(offsetDate)#/td/tr
/cfif
cfset offsetDate = DateAdd(m, offset, Now())
cfif offsetDate eq Now()
This bit might be a bit dodgy as you're assuming no time has passed
between now() and now(). It could occasionally fail. It might be better
to simple test if offset eq 0.
10 matches
Mail list logo