That is perfect, thanks Pascal!

Saturday.


---------- Original Message ----------------------------------
From: "Pascal Peters" <[EMAIL PROTECTED]>
Reply-To: [email protected]
Date:  Thu, 23 Dec 2004 13:48:45 +0100

>UKTodayDate is not a function, but a variable:
>
>nextEdition = lcase(DateFormat(DateAdd("m", 1, UKTodayDate),"mmmm"))
>
>> -----Original Message-----
>> From: Stuart Kidd [mailto:[EMAIL PROTECTED]
>> Sent: 23 December 2004 13:39
>> To: CF-Talk
>> Subject: DateAdd problems.
>> 
>> Hi,
>> 
>> I'm having an annoying problem with DateAdd.
>> 
>> I'm hosted in the States and I'm in the UK so to fix that in my
>> Applicatin.cfm I've put:
>> 
>> <cfset UKtodayDate = #DateAdd("h", 5, Now())#>
>> 
>> That is fine and i've used it forever.
>> 
>> To find the current edition (month) of my magazine I use:
>> 
>> <cfset thisEdition = lcase(MonthAsString(month(UKtodayDate)))>
>> 
>> I want to have an image on my page which displays the next month's
>advert
>> and I'm trying to get the next month's name.
>> 
>> I've tried:
>> 
>> <cfset nextEdition = #DateAdd("m", 1,
>> lcase(MonthAsString(month(UKtodayDate()))))#>
>> 
>> This doesn't seem to work so I have broken it down into two lines
>which
>> is:
>> 
>> <cfset nextEditionA = #DateAdd("m", 1, Now())#>
>> <cfset nextEdition = lcase(MonthAsString(month(nextEditiona)))>
>> 
>> This works BUT only when i use 'Now', but i'd really like to use
>> 'UKtodayDate' (otherwise it's five hours behind) but for some bizarre
>> reason it doesn't work.
>> 
>> Is it because when i do my initial DateAdd (<cfset UKtodayDate =
>> #DateAdd("h", 5, Now())#>) i'm doing it incorrectly?
>> 
>> Is there a way I can get all of this on 1 line instead of two?
>> 
>> Thanks for your help,
>> 
>> Saturday
>> 
>> 
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188623
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to