DateFormat()
in ColdFusion 2021 is now case-sensitive.
This no longer produces the desired result:
<cfoutput>#dateFormat("11/21/2020 2:38:16 PM","MM/DD/YYYY")#</cfoutput>
Pre-ColdFusion 2021:
11/21/2020
ColdFusion 2021:
11/326/2020
Note that ColdFusion 2021 displays the day of the year
To fix:
<cfoutput>#dateFormat("11/21/2020 2:38:16 PM","mm/dd/yyyy")#</cfoutput>
Adobe has added a JVM flag that can adjust this behavior:
-Dcoldfusion.datemask.useDasdayofmonth which defaults to FALSE
https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-c-d/DateFormat.html
Since Adobe is defaulting to FALSE
it's probably best to update your code accordingly.
An information technology professional with twenty five years experience in systems administration, computer programming, requirements gathering, customer service, and technical support.
0 Comments