[thelist] Questions

Ben Dyer ben_dyer at imaginuity.com
Sat Jun 16 14:28:19 CDT 2001


At 02:17 PM 6/16/2001, you wrote:
>Hi All,
>
>I am new to ColdFusion and I have 2 questions.
>
>1) How do I create a date object in ColdFusion (mm-dd-yy) format to appear
>at the top of the page?

Use this within <CFOUTPUT>...</CFOUTPUT>
#DateFormat(Now(),"MM-DD-YY")#

>2) On a form I have separate fields for inputting a phone area code, phone
>prefix and a phone suffix.  How would I combine those into one variable,
>formatted as (555)121-2121,  to be inserted in a database field phone?

<CFSET new_phone = "(#Form.area_code#)#Form.prefix#-#Form.suffix#">

Then use the #new_phone# variable wherever you need to.

--Ben


<!-----------------------
Ben Dyer
Senior Internet Developer
Imaginuity Interactive
http://www.imaginuity.com
//---------------------->






More information about the thelist mailing list