AdobeStock_455007340

Using Dates in SQL Statements

Home » Using Dates in SQL Statements

Any time you pass a date to a SQL statement (using ODBC drivers) use the CreateODBCDate() function to format it correctly. This applies not just to the WHERE clause, but to any part of the SQL statement. Be it the VALUES in an INSERT, the SET in an UPDATE, HAVING, or any other clause, use this function eliminate data conversion problems. (Applies to: ColdFusion All)

Leave a Reply