Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

Excel import - Date fields are being imported differently based on user timezone

Posted on by 227

Hi, we are trying to read an xlsx spreadsheet to import data into Business Central and create purchase invoices.

We are following the logic found here: https://madhda.com/microsoft-dynamics-365-business-central-how-to-use-excel-buffer-to-import-data-with-multiple-sheets/

We are experiencing issue with cells formated as date that are being imported with a different value based on the user timezone

The files being imported are generated automatically by another system that we have no control over.

We are trying to be able to import the files as is, without any user having to do any conversion or changes to them

If we save the file as CSV, we see the same value was if we open the excel file as is, which should be 7/19/2022

If the user importing the file is in any timezone before UTC time, it's changing the date to be 7/18/2022

If the user is in UTC or anything greater than UTC, the date is being imported properly.

If we create our own sample file with same data, it's all being imported as 7/19/2022 regardless of the user timezone settings

How can we get the same result importing a file regardless of where it's coming from?

Please note that the data is not being formated or modified in any way during the import

The dates mentioned above are the ones we see in the debugger from ExcelBuffer."Cell Value as Text"

Any ideas?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,151 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,963 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans