Re: formatting #MonthasString
if the field: MONTH is numeric and you want the actual String: #MonthAsString(month)# --- MonthAsString only takes 1 parameter. [EMAIL PROTECTED] 10/18/02 12:30PM Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: formatting #MonthasString
I would make a full date, then use date format to get the result I wanted in this case, either that or use string functions like left to get what you want. Tim -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 12:30 PM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: formatting #MonthasString
MonthAsString will converts X, where X is the month of the year, to a string. What you want to is to change X into a real date object. You can do this by using createDate(). Then you can use dateFormat to format the month. Or, if you just want the three letter abreviation - aren't all of them just the first 3 letters? If so, just do left(monthAsString(x),3). === Raymond Camden, ColdFusion Jedi Master for Hire Email: [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 12:30 PM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: formatting #MonthasString
Just: #monthAsString(month)# There aren't any formatting parameters. Adam Wayne Lehman Web Systems Developer Johns Hopkins Bloomberg School of Public Health Distance Education Division -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 12:30 PM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: formatting #MonthasString
You can use #DateFormat(YourDate,mmm)# Or #MonthAsString(month(YourDate))# month(YourDate) gives you the month. Joe On Fri, 18 Oct 2002 12:30:15 -0400 Tim Laureska [EMAIL PROTECTED] wrote: Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: formatting #MonthasString
No, you can't specify formatting within the MonthAsString() function. Instead, you might consider using DateFormat() as in: CFSET month = 10 CFSET myDate = CreateDate(Year(Now()), month, Day(Now())) CFOUTPUT#DateFormat(myDate, mmm)#/CFOUTPUT -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 12:30 PM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: formatting #MonthasString
OK... I was just trying to convert the month number (ex 10 for October) into Oct instead of October -Original Message- From: Randell B Adkins [mailto:AdkinsR;GAO.GOV] Sent: Friday, October 18, 2002 1:10 PM To: CF-Talk Subject: Re: formatting #MonthasString if the field: MONTH is numeric and you want the actual String: #MonthAsString(month)# --- MonthAsString only takes 1 parameter. [EMAIL PROTECTED] 10/18/02 12:30PM Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: formatting #MonthasString
Adrocknaphobia Jones writes: You could just create a small array. monthAsString[1]= Jan monthAsString[2]= Feb etc.. I guess the reason there is not prefab-format option is for Months like June and April. Not really a common 3 letter abbrv. for short month names. Sure there is...Apr and Jun :) Jan Feb Mar Apr May (shaddap) :) Jun Jul Aug Sep Oct Nov Dec charlie Adam Wayne Lehman Web Systems Developer Johns Hopkins Bloomberg School of Public Health Distance Education Division -Original Message- From: Timothy Heald [mailto:healdt;dsmail.state.gov] Sent: Friday, October 18, 2002 1:51 PM To: CF-Talk Subject: RE: formatting #MonthasString I would make a full date, then use date format to get the result I wanted in this case, either that or use string functions like left to get what you want. Tim -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 12:30 PM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: formatting #MonthasString
Larry thanks a bunch I just didn't know the correct syntax Tim -Original Message- From: Larry Juncker [mailto:larry;heartlandinternet.com] Sent: Friday, October 18, 2002 3:40 PM To: CF-Talk Subject: RE: formatting #MonthasString Tim; What exactly is you are wanting to end up with? If you are providing a number as the month such as: month = 10 and you are wanting the String representation of such then MonthAsString(month) is all you need to give you: October else if you want just the first Three letters of MonthAsString then do this: Left(MonthAsString(month),3) This will give you Oct Hope this helps with what you are wanting Larry Juncker Senior Cold fusion Developer Heartland Communications Group, Inc. [EMAIL PROTECTED] (515) 574-2122 CONFIDENTIALITY NOTICE The information contained in this e-mail is intended only for the use of the individual or entity to which it is addressed. This e-mail may contain information that is privileged, confidential and/or personal. If the reader of this message is not the intended recipient (or the employee or agent responsible to deliver it to the intended recipient), you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited. If you have received this communication in error, please notify us at the e-mail listed above. -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 11:30 AM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: formatting #MonthasString
You could just create a small array. monthAsString[1]= Jan monthAsString[2]= Feb etc.. I guess the reason there is not prefab-format option is for Months like June and April. Not really a common 3 letter abbrv. for short month names. Adam Wayne Lehman Web Systems Developer Johns Hopkins Bloomberg School of Public Health Distance Education Division -Original Message- From: Timothy Heald [mailto:healdt;dsmail.state.gov] Sent: Friday, October 18, 2002 1:51 PM To: CF-Talk Subject: RE: formatting #MonthasString I would make a full date, then use date format to get the result I wanted in this case, either that or use string functions like left to get what you want. Tim -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 12:30 PM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Re: formatting #MonthasString
Tim - try: #MonthAsString(month)# --- there is no masking. If you really want to mask: #DateFormat(CreateDate(2002, month, 1), MM)# Mike Wokasch UW-Extension more coldfusion help Efnet #ColdFusion At 12:30 PM 10/18/2002 -0400, you wrote: Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: formatting #MonthasString
Tim; What exactly is you are wanting to end up with? If you are providing a number as the month such as: month = 10 and you are wanting the String representation of such then MonthAsString(month) is all you need to give you: October else if you want just the first Three letters of MonthAsString then do this: Left(MonthAsString(month),3) This will give you Oct Hope this helps with what you are wanting Larry Juncker Senior Cold fusion Developer Heartland Communications Group, Inc. [EMAIL PROTECTED] (515) 574-2122 CONFIDENTIALITY NOTICE The information contained in this e-mail is intended only for the use of the individual or entity to which it is addressed. This e-mail may contain information that is privileged, confidential and/or personal. If the reader of this message is not the intended recipient (or the employee or agent responsible to deliver it to the intended recipient), you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited. If you have received this communication in error, please notify us at the e-mail listed above. -Original Message- From: Tim Laureska [mailto:hometeam;goeaston.net] Sent: Friday, October 18, 2002 11:30 AM To: CF-Talk Subject: formatting #MonthasString Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: formatting #MonthasString
Tim Laureska writes: OK... I was just trying to convert the month number (ex 10 for October) into Oct instead of October I think Raymond posted the answer to that...but in case you missed it... cfset month = 10 cfoutput#left(monthAsString(month), 3)#/cfoutput charlie -Original Message- From: Randell B Adkins [mailto:AdkinsR;GAO.GOV] Sent: Friday, October 18, 2002 1:10 PM To: CF-Talk Subject: Re: formatting #MonthasString if the field: MONTH is numeric and you want the actual String: #MonthAsString(month)# --- MonthAsString only takes 1 parameter. [EMAIL PROTECTED] 10/18/02 12:30PM Is there a way to format a number value retrieved for a month (ex 10 for the month of October) with the #monthasString# function. say to the ? I tried #MonthasString(month, MM)# but it throws an error (note:month is the field name) Tim ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm