I've got a form that's accepting the following date formats
(YYYY-MM-DD and MM-DD-YYYY).
Just wondering if it's even necessary to use the
CreateODBDate when I'm passing in the dates in my <cfquery>
using a queryparam with a type of cf_sql_date?
From what I understand cf_sql_date will recognize either of
the two formats and properly create the ODBC date the way it's
supposed to, but I can't find any resources that says this. Anyone
know this for sure or not, and maybe have a reference I can point
my team in the right direction?
Unless there is a known difference in how the two parse date
strings, I would say no. Both parse a string and return a properly
formatted date/time object. I strongly suspect they both use the
same parsing method behind the scenes anyway.
As an aside, MM-DD-YYYY can be interpreted multiple ways. But
most likely both CreateODBCDate and cfqueryparam will interpret the
value the same way.. for right or wrong ;-)