Mase
Mase

Reputation: 37

Laravel 4.2 created_at column gives "The format separator does not match" error

I am trying to access the created_at column in one of my models and I get the following error:

The format separator does not match. The format separator does not match. The format separator does not match.

The error actually repeats 3 times.

This is how I try to access the column:

$model->created_at

I do not have $timestamps set to false in my model and I can access the other columns just fine.

What is the problem?

Upvotes: 3

Views: 2835

Answers (1)

JMc
JMc

Reputation: 355

Did you override the getDateFormat() in your model?

I ran into this problem last week. The problem is the datetime format. I have a link that explains the error.
https://github.com/laravel/framework/pull/4181

If you have overridden the getDateFormat(), comment out the function and see if it works.

If not, make sure the datetime format in your database is not funky.

Upvotes: 5

Related Questions