<!--- This example shows the use of ParseDateTime--->

<HTML>

<HEAD>
<TITLE>
ParseDateTime Example
</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">

<H3>ParseDateTime Example</H3>

<CFIF IsDefined("form.theTestValue")>

	<CFIF IsDate(form.theTestValue)>
	<H3>The expression <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is a valid date</H3>
	<P>The date, parsed for use as a date/time value: <CFOUTPUT>#ParseDateTime(form.theTestValue)#</CFOUTPUT>

	<CFELSE>
	<H3>The expression <CFOUTPUT>#DE(form.theTestValue)#</CFOUTPUT> is not a valid date</H3>

	</CFIF>


</CFIF>

<FORM ACTION="parsedatetime.cfm" METHOD="POST">
<P>Enter an expression, and discover if
it can be evaluated to a date value.

<INPUT TYPE="Text" NAME="TheTestValue" VALUE="<CFOUTPUT>#DateFormat(Now())# #TimeFormat(Now())#</CFOUTPUT>">

<INPUT TYPE="Submit" VALUE="Parse the Date" NAME="">

</FORM>

</BODY>

</HTML>       
  
