Date format not recognized
NBA707 opened this issue · comments
In the table, all the date fields are working great, however I have a field that is DD-MON-YY (ie: 02-FEB-23 instead of 02/02/2023)
When I grab the record I want, the field shows as:
$data = My_Model::find(23);
$data->quote_date: "0203-02-02 00:00:00"
Is there a way to tell the model that this particular field has an odd date format? Or how best to handle this?
If I do the RAW SQL and call "alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';" it shows up as the same value
The data actually shows:
ID Quote_Date
8908 0203-02-02 00:00:00
8906 2023-02-02 00:00:00
8864 2023-01-17 00:00:00
Not sure why Oracle is treating the date field like this for this specific record.
- Ubuntu 20.04
- PHP 8.2
- Laravel 8
- Laravel-OCI8 8.6.3
They entered 0203 for the year, and that is what is causing Oracle to not understand what is entered.
Would be nice if there was a way to support very odd years