SpartnerNL / Laravel-Excel

🚀 Supercharged Excel exports and imports in Laravel
https://laravel-excel.com
MIT License
12.26k stars 1.91k forks source link

NULL value in date column being converted to 1/1/2019 while exporting to xlsx #2480

Closed jaynarayan89 closed 4 years ago

jaynarayan89 commented 4 years ago

In my data set i have column name transfer_date which is null for some rows. when i export this data to excel sheet, the null values is converted to 1/1/2019.

ghost commented 4 years ago

Thanks for submitting the ticket. Unfortunately the information you provided is incomplete. We need to know which version you use and how to reproduce it. Please include code examples. Before we can pick it up, please check (https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/.github/ISSUE_TEMPLATE.md) and add the missing information. To make processing of this ticket a lot easier, please make sure to check (https://laravel-excel.maatwebsite.nl/3.1/getting-started/contributing.html) and double-check if you have filled in the issue template correctly. This will allow us to pick up your ticket more efficiently. Issues that follow the guidelines correctly will get priority over other issues.

jaynarayan89 commented 4 years ago

The problem was in my mapping function where I was using carbon::parse() which was converting the null values to 1/1/2019.

gamenic-babin commented 6 months ago

The problem was in my mapping function where I was using carbon::parse() which was converting the null values to 1/1/2019.

This worked