home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows how to use Createdate,
- Createdatetime, and createODBCdate --->
-
- <HTML>
-
- <HEAD>
- <TITLE>
- CreateDate Example
- </TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <H3>CreateDate Example</H3>
-
- <CFIF IsDefined("form.year")>
- Your date value, presented using different CF date functions:
- <CFSET yourDate = CreateDate(form.year, form.month, form.day)>
-
- <CFOUTPUT>
- <UL>
- <LI>Built with CreateDate: #CreateDate(form.year, form.month, form.day)#
- <LI>Built with CreateDateTime: #CreateDateTime(form.year, form.month, form.day, 12,13,0)#
- <LI>Built with CreateODBCDate: #CreateODBCDate(yourDate)#
- <LI>Built with CreateODBCDateTime: #CreateODBCDateTime(yourDate)#
- </UL>
-
- <P>The same value can be formatted with dateFormat:
- <UL>
- <LI>Built with CreateDate: #DateFormat(CreateDate(form.year, form.month, form.day), "mmm-dd-yyyy")#
- <LI>Built with CreateDateTime: #DateFormat(CreateDateTime(form.year, form.month, form.day, 12,13,0))#
- <LI>Built with CreateODBCDate: #DateFormat(CreateODBCDate(yourDate), "mmmm d, yyyy")#
- <LI>Built with CreateODBCDateTime: #DateFormat(CreateODBCDateTime(yourDate), "d/m/yy")#
- </UL>
-
-
- </CFOUTPUT>
-
- </CFIF>
-
-
- <CFFORM ACTION="createdate.cfm" METHOD="POST">
- <P>Please enter the year, month and day in integer format for
- the date value you would like to view:
- <PRE>
- Year <CFINPUT TYPE="Text" NAME="year" VALUE="1998" VALIDATE="integer" REQUIRED="Yes">
- Month <CFINPUT TYPE="Text" NAME="month" VALUE="6" VALIDATE="integer" REQUIRED="Yes">
- Day <CFINPUT TYPE="Text" NAME="day" VALUE="8" VALIDATE="integer" REQUIRED="Yes">
- </PRE>
- <P><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">
-
-
- </CFFORM>
-
-
-
- </BODY>
-
- </HTML>
-