New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] date field is not imported #2583
Comments
Is created_at fillable on your model? |
Yes. I have all fields fillable |
Try to dd() and see what's in there. |
sorry for delay. I was on vacation.
and I see strange date output on the page
|
any idea? |
I found problem. |
Only once I was able to do import succesfully and then I still have some problems, which I cannot understand. I tested few times how should I keep date in Excel before import and I see not stabile behaviour. I make all date fields format = text in excel.
pointing on \vendor\nesbot\carbon\src\Carbon\Traits\Creator.php:623
But when I do
What is wrong? |
Seems that I found solution. If date fields formated as date in Excel in my case date 2014-05-08 was always converted to 41767 before import. I don't know why. Only way I could get 41767 is when I tryed in Excel formula So only working solution is text format with YYYY-MM-DD text inside. |
I'm having the same issue. The 'date' fields are returning a number (a ref, I guess?) and not the value. |
To get Carbon when having the date column formatted as a date: |
It works for not empty fields. But when import script reach empty field it stops with following error.
What to do?
It gives error |
Put it into a temporary variable |
what do you mean under "temporary variable"? |
I found acceptable solution
|
Prerequisites
Versions
Description
created_at
field is not imported in database. Instead I see 1970-01-01 in phpmyadminSteps to Reproduce
The text was updated successfully, but these errors were encountered: