| Contents > CFML Reference > ColdFusion Functions > IsDate |
|
|
|
|
||
Determines whether a string or Java object can be converted to a date/time value.
True, if string can be converted to a date/time value; otherwise, False. ColdFusion converts the Boolean return value to its string equivalent, "Yes" or "No."
Date and time functions, Decision functions
IsDate(string)
CreateDateTime, IsNumericDate, LSDateFormat, LSIsDate, ParseDateTime
Parameter |
Description |
|---|---|
string |
A string or a variable that contains one. |
This function checks against U.S. date formats only. For other date support, see LSDateFormat.
A date/time object falls in the range 100 AD-9999 AD.
<h3>IsDate Example</h3>
<cfif IsDefined("FORM.theTestValue")>
<cfif IsDate(FORM.theTestValue)>
<h3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput>
is a valid date</h3>
<cfelse>
<h3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput>
is not a valid date</h3>
</cfif>
</cfif>
<form action = "isDate.cfm">
<p>Enter a string, find whether it can be evaluated to a date value.
<p><input type = "Text" name = "TheTestValue" value = "<cfoutput>#Now()#
</cfoutput>">
<input type = "Submit" value = "Is it a Date?" name = "">
</form>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > IsDate |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct128.htm
Comments
spitch said on Oct 1, 2003 at 12:41 PM : spitch said on Oct 1, 2003 at 1:07 PM : John2 said on Mar 17, 2004 at 3:11 AM : ASandstrom said on May 9, 2005 at 11:06 AM : BoBNoT said on Aug 12, 2005 at 11:45 AM : BoBNoT said on Aug 12, 2005 at 11:47 AM :