You create a calculated column in a SharePoint list that should show a future date, a past date, or a date difference. Instead, the column displays a date that is off by exactly one day or shows an unexpected year. This problem almost always happens because SharePoint interprets the date formula differently than you expect, often due to time zone offset or the way SharePoint stores dates. This article explains the root cause of wrong date calculations in SharePoint calculated columns and provides the exact formula fix.
Key Takeaways: Fixing Wrong Dates in Calculated Columns
- DateValue function and text dates: Always wrap a date string like “1/1/2025” in DateValue to avoid year misinterpretation.
- DATEDIF function for date differences: Use DATEDIF to calculate the number of days, months, or years between two dates correctly.
- Time zone offset handling: Add or subtract 0.5 (12 hours) to correct for SharePoint’s internal date storage offset.
Why SharePoint Calculated Columns Return the Wrong Date
SharePoint stores dates in Coordinated Universal Time (UTC) internally. When you type a date directly into a formula, SharePoint may interpret the date as a text string and convert it using the server’s regional settings. This can cause the date to shift by one day forward or backward. Also, when you use basic arithmetic like [End Date] + 1, SharePoint treats the date as a serial number, but the result may be affected by time zone offset.
Another common cause is using a date literal without the DateValue function. For example, writing "1/1/2025" directly in a formula does not guarantee that SharePoint treats it as a date. Instead, SharePoint may interpret it as text, leading to a #VALUE! error or a wrong date.
The Time Zone Offset Problem
SharePoint’s date column stores the date and time in UTC. When you calculate a date difference or add days, the time part of the date can cause the result to be off by one day. For instance, if the date stored is midnight UTC (12:00 AM), but your local time zone is UTC+1, SharePoint might display the date as the previous day. The fix is to strip the time part from the date using the INT function or adjust with a 0.5 offset.
Year Misinterpretation with Two-Digit Years
If you enter a date with a two-digit year, such as "1/1/25", SharePoint may interpret the year as 1925 instead of 2025. This happens because SharePoint uses a configurable cutoff year (default is 2029). Dates with two-digit years below 30 are assumed to be in the 2000s, but dates with two-digit years 30 and above are assumed to be in the 1900s. This can cause calculated columns to return a date in the wrong century.
Steps to Fix Wrong Date Calculations in SharePoint
Follow these steps to correct the calculated column formula and ensure dates are accurate.
- Open the list and edit the calculated column
Go to the SharePoint list that contains the calculated column. Click the gear icon and select List settings. Under Columns, click the name of the calculated column that returns the wrong date. - Check the formula for date literals
If your formula contains a hard-coded date like “1/1/2025”, replace it with DateValue(“1/1/2025”). This ensures SharePoint treats the text as a date. For example, change= [Start Date] + "1/1/2025"to= [Start Date] + DateValue("1/1/2025"). - Use the DATE function for fixed dates
If you need a specific date, use the DATE function with three arguments: year, month, day. For example,= DATE(2025, 1, 1)returns January 1, 2025. This avoids text interpretation issues entirely. - Fix time zone offset by stripping time
If the date is off by one day, strip the time part by wrapping the date reference with INT. For example, change= [Due Date] + 7to= INT([Due Date]) + 7. This removes the time component and adds exactly 7 days. - Correct two-digit year in the formula
If you must use a two-digit year, always use the DATE function with a four-digit year. For example,= DATE(2025, 1, 1)instead of= DateValue("1/1/25"). This prevents the century cutoff issue. - Use DATEDIF for date differences
To calculate the number of days between two dates, use DATEDIF. For example,= DATEDIF([Start Date], [End Date], "d")returns the number of days. This function handles the date serial numbers correctly and avoids time zone offset problems. - Test the formula with a sample row
After updating the formula, click OK to save the column. Add a new list item or edit an existing one to verify the calculated column shows the correct date. Check for edge cases like dates near midnight or month boundaries.
If the Calculated Column Still Shows the Wrong Date
The formula returns a #VALUE! error
This error usually means SharePoint cannot interpret the date string. Replace any hard-coded date text with the DATE function or DateValue. Also, ensure that the date format used in the formula matches the server’s regional settings. For example, if the server uses dd/mm/yyyy, then DateValue(“1/2/2025”) returns February 1, not January 2.
The date is off by exactly one day in a date difference calculation
This happens when the time part of one date is later than the time part of the other date. For example, if [Start Date] is 1/1/2025 8:00 AM and [End Date] is 1/2/2025 7:00 AM, the difference in days is less than 24 hours. Use the DATEDIF function with “d” to get the calendar day difference, which ignores the time part. Alternatively, use = INT([End Date]) - INT([Start Date]) to strip the time from both dates.
The calculated column shows a date in the year 1899 or 1900
This occurs when the formula returns a number that is not a valid date serial number. SharePoint treats the number 1 as January 1, 1900. If your formula results in a small number, you may see a date in 1900. Check that you are adding days to a date column, not to a number. For example, = [Start Date] + 7 is correct, but = 7 + [Start Date] is also correct. However, = [Start Date] + "7" treats “7” as text and may cause an error.
Date Function vs DateValue: Key Differences
| Item | DATE function | DateValue function |
|---|---|---|
| Input format | Three separate numbers: year, month, day | One text string: “month/day/year” |
| Year handling | Always uses the year number as given; use four-digit years | Interprets two-digit years based on server cutoff; use four-digit years |
| Regional settings | Not affected by regional date format | Affected by regional date format (e.g., dd/mm vs mm/dd) |
| Best use case | Fixed dates in formulas, especially with four-digit years | Converting a date string from another column or user input |
Use the DATE function when you need a fixed date that should not change based on regional settings. Use DateValue when you need to convert a date string from a text column or when the date comes from an external source.
Now you can correct any calculated column that returns a wrong date. Start by checking your formula for hard-coded date text and replace it with the DATE function. Also, apply the INT function to strip time offsets. For date differences, always use DATEDIF. If you still see issues, verify that your SharePoint site’s regional settings match the date format you use in the formula.