tracker issue : CF-4204191

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

CreateODBCDateTime() with DateFormat() and CreateODBCTime() results in incorrect ODBCDateTime output

| View in Tracker

Status/Resolution/Reason: Needs Review//HaveNewInfo

Reporter/Name(from Bugbase): Shannon E. / ()

Created: 04/18/2019

Components: Functions, Datetime

Versions: 2016,2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.10.314028 /

Priority/Frequency: Normal / All users will encounter

Locale/System: / Win 2016

Vote Count: 0

Problem Description: When creating a ODBC DateTime string, if you Wrap a DateFormat() and CreateODBCTime() in a CreateODBCDateTime(), the Output is miscalculated. Currently This affects ColdFusion 2016 and ColdFusion 2018, Update level seems not to matter.

Steps to Reproduce: Set a Time value, and attempt to create an ODBC DateTime string, while using DateFormat() and CreateODBCTime() functions inside the CreateODBCDateTime().

Actual Result:
{ts '2089-05-20 00:00:00'}

Expected Result:
{ts '2019-04-18 00:00:00'}

Any Workarounds:
use TimeFormat() instead of CreateODBCTime(), Re-write with CreateDateTime() and specify each time segment with Year(), Month(), Day(), Hour(), Minute().