f/ColdFusion posted by rob -
The Value Class java.time.LocalDateTime Cannot Be Converted To A Date In ColdFusion

I ran in to an annoying “feature” in ColdFusion when using MySQL connector jars version 8.0.23+ when trying to retrieve a timestamp from the database. When trying to date format the value I received the error “ java.time.LocalDateTime Cannot Be Converted To A Date”.

One solution would be rolling back the MySQL driver version to 8.0.22 which was the last version that worked correctly with ColdFusion as per Ben's post on the issue.

I did find another solution at Adobe's issue tracker site here: https://tracker.adobe.com/#/view/CF-4211276 . Using the MySQL CAST() feature to cast the column to char in the SELECT, i.e. CAST(column as char) AS column, will resolve the issue, as noted by Anthony K.

 

0 Comments
There are no comments yet. Start the conversation.
f/ColdFusion
Adobe and Lucee related content

Created May 23, 2023

2
Members

Moderators
u/rob