{"record":{"id":"895f1bb968766eba","repo":"octobercms/october","slug":"column-value-column-is-not-a-datetime-object-a","errorCode":null,"errorMessage":"Column value ':column' is not a DateTime object, are you missing a $dates reference in the Model?","messagePattern":"Column value ':column' is not a DateTime object, are you missing a \\$dates reference in the Model\\?","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/backend/widgets/lists/HasValueProcessor.php","lineNumber":494,"sourceCode":"    /**\n     * evalColorPickerTypeValue as background color, to be seen at list\n     */\n    protected function evalColorPickerTypeValue($record, $column, $value)\n    {\n        return $this->makePartial('column_colorpicker', [\n            'value' => $value\n        ]);\n    }\n\n    /**\n     * validateDateTimeValue column type\n     */\n    protected function validateDateTimeValue($value, $column)\n    {\n        $value = DateTimeHelper::makeCarbon($value, false);\n\n        if (!$value instanceof Carbon) {\n            throw new ApplicationException(Lang::get(\n                'backend::lang.list.invalid_column_datetime',\n                ['column' => $column->columnName]\n            ));\n        }\n\n        return $value;\n    }\n\n    /**\n     * getFileTypeIcon returns the appropriate Phosphor icon for a file extension\n     */\n    protected function getFileTypeIcon(string $extension): string\n    {\n        $extension = strtolower($extension);\n\n        $iconMap = [\n            // Archives\n            'zip' => 'file-zip',","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/widgets/lists/HasValueProcessor.php#L476-L512","documentation":"validateDateTimeValue() could not convert the column's underlying value to a Carbon instance for a date/time-type list column. The model attribute is a raw string/integer rather than a cast date, i.e. the model lacks a $dates (or casts) entry causing DateTimeHelper::makeCarbon() to fail or return non-Carbon.","triggerScenarios":"Thrown at modules/backend/widgets/lists/HasValueProcessor.php:494 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the attribute to the model's $dates array (or $casts as 'datetime') so it is hydrated as a Carbon object","Verify the database column actually contains a valid date/time value and is not null or malformed","For custom value resolution, use the column's valueFrom or a custom list column type that handles the raw format"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}