I have a form in which users enter a date in the form of mm/dd/yy. But I've noticed that sometimes a user (one particular user!) enters the date in the form of mm/ddyy, so CF and SQL Server get 8/1403, which returns an error.
I've tried validating it with "IsDate" and several different variations of IF statements such as:
<cfif Form.Date NEQ #DateFormat(Form.Date, 'mm/dd/yy')#>
Error
<cfelse>
No Error
</cfif>
But CF always seems to let this date get through, which of course bombs out when it hits the SQL Server.
Is there any way that I can validate that the date format is mm/dd/yy?
Thanks!
I've tried validating it with "IsDate" and several different variations of IF statements such as:
<cfif Form.Date NEQ #DateFormat(Form.Date, 'mm/dd/yy')#>
Error
<cfelse>
No Error
</cfif>
But CF always seems to let this date get through, which of course bombs out when it hits the SQL Server.
Is there any way that I can validate that the date format is mm/dd/yy?
Thanks!