All work
2 of 2
QueryNew does not treat "date" columns as dates
Description
Environment
CentOS 7
Tomcat 9.0.37
Lucee 5.3.6.61
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Dan Switzer, II
Dan Switzer, IIPriority
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 2 September 2020 at 13:31
Updated 7 September 2020 at 14:09
The
queryNew()
function is not treatingdate
columns as date objects. If the value is original passed as a string, it stays a string, which can cause issues when expecting the column value to be treated as a date.For example:
I would expect the
sdf.format(data.modified[1]);
line to execute (as it does in ACF 10+), but instead it throws an exception. You have to change the line to:I would expect columns defined as a
date
to be treated as a date like it does in ACF.Here's a Gist that shows the behavior:
https://www.trycf.com/gist/a1878db461c0b1ceb6659c7441b3ab86/lucee5?theme=monokai