tbdevmanager
tbdevmanager

Reputation: 383

Different query results returned in Coldfusion versions

We are running a cfquery on two different versions of ColdFusion (CF9 and CF10). When the results are returned the dates are formatted differently in the separate versions.

The Query is

SELECT TOP 100 CONVERT(DATE,Field1,121),Field2
FROM A_TABLE

In CF9 the return for Field 1 looks like 2010-06-01.

In Cf10 the the return for Field 1 looks like {ts '2010-06-01 00:00:00'}

Has anyone else notice this difference? We have searched the CF documentation and haven't noticed any mention of this change.

Upvotes: 4

Views: 487

Answers (1)

Scott Stroz
Scott Stroz

Reputation: 7519

The data being returned is the same. What you are seeing in CF10 is the way ColdFusion displays date/time objects. (edited based on feedback from Miguel-F)

Whenever you are outputting dates/times, you can (and should) use dateFormat() , timeformat() (and in CF 10 datetimeformat() ) to format the dates/times in a standard way.

Upvotes: 6

Related Questions