tracker issue : CF-4203678

select a category, or use search below
(searches all categories and all time range)
Title:

CF2018 CF_SQL_TIMESTAMP / MSSQL "datetime" fields not matching when milliseconds is .880 ( or any trailing zero )

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Gareth Edwards / ()

Created: 12/10/2018

Components: Database, CFQuery

Versions: 13.0

Failure Type: Data Loss

Found In Build/Fixed In Build: CF2018 Update 1 / 313573

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10

Vote Count: 1

Problem Description:
CF2018 CF_SQL_TIMESTAMP / MSSQL "datetime" fields not matching when milliseconds is .880 ( or any trailing zero )

Steps to Reproduce:
{code:java}
SELECT datetime_field 
FROM mssql_table
{code}


Field in the database is 2018-12-10 15:05:39.880 , but returns 2018-12-10 15:05:39.88 ( CF11 does this also )
Then use 
{code:java}
<cfqueryparam cfsqltype="CF_SQL_TIMESTAMP" value="#the value from the field above#" />
{code}

The resulting query is something like this

{code:java}
SELECT datetime_field 
FROM mssql_table
WHERE datetime_field = 2018-12-10 15:05:39.088 ( notice where it put the zero )
{code}

This doesn't return the correct record from the database.

Any Workarounds:
None

Attachments:

Comments: