Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
silstorm #1
Getting the month by Number
Hi Folks,
I'm trying to create an archive system, and want to be able to display
articles according to the month. The system I have setup at the moment appears
to work, apart from one part. At the top of the index for that month, I was to
have the text 'Articles added in (month), (year).
Now the year isn't a problem because I'm obviously passing that as the
displayed value anyway. However, I'm passing the month as a number - ie 7 for
July. The URL works like this = [url]www.myserver.com/archive.cfm/month/7/year/2005[/url]
(I'm using a search engine safe url system).
So, I need a way of converting the month number to the month name. I've tried
a few different methods, but they all seem to bring back January for some
reason, so I'm guessing I'm not doing it correctly.
Any advice would be appreciated!
silstorm Guest
-
change month number to name
I have a setting for a calendar that defaults the calender to the current month <cfset cal_month=dateformat(now(), "m")> This can be changed by the... -
int Number to text Number Function / UDF ?
Is there a function that converts e.g. 3 to Three? Probably not but I just thought I'd ask. -
sort from the smallest number to the highest number
Hi Just say I want to sort the row by using the fifth column data as reference from the smallest the largest number, if using sort, It will give... -
Can I display a month from a number in a csv file?
Greetings from a second day newbie to php. I think I have figured out a way to explode a field in a csv file (like 11-08-03) and implode it as... -
to convert a month to previous month
How to convert a month to previous month in a very easy way? For example, I have AUGUST, but I want JULY to return. Thanks. *** Sent via... -
Jibé #2
Re: Getting the month by Number
..../....> I'm trying to create an archive system, and want to be able to display
> articles according to the month. The system I have setup at the moment appears
> to work, apart from one part. At the top of the index for that month, I was to
> have the text 'Articles added in (month), (year).> So, I need a way of converting the month number to the month name. I've tried
> a few different methods, but they all seem to bring back January for some
> reason, so I'm guessing I'm not doing it correctly.
>Maybe something like :>
<cfset YourDate = CreateDate(#Year#, #month#, 1)>
and after
Articles added in #DateFormat(YourDate,"mmmm")#, (#year#)
JB
Jibé Guest
-



Reply With Quote

