Difference in days between two dates

Anonymous
2020-03-20T15:38:27+00:00

I am trying to get the difference in days between two dates. Both are in the MM/DD/YYYY format and are stored as short dates in excel. I Should be getting values around the 20 - 40 range on average, but instead am getting values around 48000. Any idea why I would be getting such an inflated value? I have tried both subtraction and the datedif function, which do return the same inflated values.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Killer 144K Reputation points Volunteer Moderator
    2020-03-20T15:41:25+00:00

    The calculation is simply like =A1-A2 and uf that throws a big number can mean that one if the date is a text.

    If you need further help please upload a sample file on your OneDrive and post the download link here.

    Andreas.

    0 comments No comments
  2. Anonymous
    2020-03-20T16:06:23+00:00

    Hi Tgrove23,

    My name is Raffaele. I am a fellow Microsoft customer and expert user here to help.

    If the cells are dates you can simply subtract them, make sure the cell that will contain the result is set to General or number.

    If the dates are text you can use DATEVALUE that converts text dates to num format.

    ie. =DATEVALUE(A2)-DATEVALUE(A1)

    Hope the information provided is useful. If the issue persists or have any other questions, reply here and we will be glad to help you.

    Thank you for posting in Microsoft Community.

    Kind regards,

    Raffaele

    0 comments No comments