Formula Errors

Fix Excel Date Formats and DATEDIF Errors from SharePoint

Muhammad TalhaMuhammad Talha Nov 20, 2026 871 views

Question details

Correct imported SharePoint dates so Excel can display them properly and use them in DATEDIF calculations.

Fix Excel Date Formats and DATEDIF Errors from SharePoint
Product
Microsoft Excel, SharePoint, and Power Automate
Device & OS
not provided
Scenario
Dates are imported from SharePoint into Excel through a Power Automate flow and used in DATEDIF formulas.
Observed behavior
Imported dates have incorrect formats or cause DATEDIF to return #VALUE! errors.
Before you start

Check the source date order, such as day/month/year or month/day/year, and identify the SharePoint site or OneDrive account connected to the flow. In Excel, left-aligned dates may be stored as text, although alignment alone is not conclusive.

Solution 1Recommended

Match SharePoint or OneDrive regional settings to the date format

Use this approach when the imported date order does not match the connected site's regional settings.

1
Open regional settings

In SharePoint, open Site information > View all site settings > Regional Settings. For OneDrive for Business, open OneDrive Settings > More Settings > Regional settings. Menu names may vary.

2
Set the matching locale

Under Locale, select English (United Kingdom) if the dates use day/month/year order, then save the setting. If the source uses a different date order, choose a locale that matches it instead.

3
Import the dates again

Run the Power Automate flow again and check the new values in Excel. Changing the locale may not convert text dates that were already imported.

4
Test the formula

In an empty Excel cell, enter =ISNUMBER(A2), replacing A2 with an imported date cell. If it returns TRUE, test a formula such as =DATEDIF(A2,B2,"d") using the start and end date cells.

Access may be required: You may need site owner or administrator permissions to change SharePoint regional settings.
Free Microsoft Office alternative

Work with Excel spreadsheets in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Excel format compatibility, making it easy to continue working with existing files. SharePoint and Power Automate regional settings must still be corrected in Microsoft services.

Open and edit Excel XLSX and XLS filesReview and format date columns in spreadsheetsUse a familiar interface for a smoother move from Microsoft OfficeWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does DATEDIF return #VALUE! for an imported date?

One or both date arguments may be text rather than Excel date values. Test each cell with =ISNUMBER(A2); FALSE indicates that it is not stored as a numeric date value.

Will changing the cell's date format convert text into a date?

No. Format Cells changes how a valid date is displayed but does not reliably convert text. Use Data > Text to Columns and select the source date order to convert suitable text dates.

Should I always select English (United Kingdom) in SharePoint?

No. English (United Kingdom) is appropriate when the relevant dates use day/month/year order. Choose regional settings that match the date format used by your source and flow.

Why does DATEDIF return #NUM! instead of #VALUE!?

DATEDIF can return #NUM! when the start date is later than the end date. Check the order of the date arguments and confirm that both dates were interpreted correctly.