| | |||||
| ||||||||
| Webmaster Tutorials Instructional webmaster-related how-to's and tutorials. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) | ||||
| Account Closed Join Date: Jul 2004
Posts: 22
![]() | Coldfusion Tutorial - Beginners - Part I Part I In Part I of this Beginner's Tutorial I will show how to calculate the current time in Macromedia Coldfusion. Before you start, you need to make sure your server can receive Coldfusion pages properly. Inorder to do so you must first install the IIS server on windows XP professional via control panel and then install a free trial or full version of Coldfusion. You may also buy coldfusion hosting online. After you have done so, you may begin your work. So let's make our first page. PHP Code: the CFOUTPUT functions just like the BODY tag in html. Only CFOUTPUT is used for Coldfusion. Every coldfusion code that you want to display is put in between the CFOUTPUT tags. CFSET is used to create and modify coldfusion variables. For example, we have written: PHP Code: the Now() function, is what really makes the difference. Now() gives the current time and date. Remember, that you can use html tags along with coldfusion tags! So if you would use the code above, your result would look something like this:
????: NamePros.com http://www.namepros.com/showthread.php?t=38759 Thanks for Reading! | ||||
| |
| | #2 (permalink) |
| Sheriff Of Nothing Join Date: Apr 2004 Location: Florida
Posts: 220
![]() | Nice, this will come in handy as I never learned ColdFusion but have it on disk from a friend, older version, but I figure I can play around with it
__________________ Lowter.com - Webmaster eZine and Community Interactive eZine, Articles, Blogs, and More Norics.com | Cascading Design | Blue Programming |
| |
| | THREAD STARTER #3 (permalink) | ||||||||
| Account Closed Join Date: Jul 2004
Posts: 22
![]() | Yes it does work with the older versions. Here is a continuation of Part I, now I will show how to modify the date to make it look the way you would like it to look. Open up the same page now change the cfset parameter to this: PHP Code: ????: NamePros.com http://www.namepros.com/showthread.php?t=38759
Here are all of the different possibilies that you may use: "mmmm" -> Month "yyyyy" -> Year "dddd" -> Day of the week "d" -> Date So, the following output: dddd mmmm yyyy would result in:
| ||||||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |