DATEDIF in Excel Online for Office 365?

J. Doe

With DATEDIF() it's possible to calculate a date difference for two dates.

However, in the new online product Excel Online (Office 365) this function seems to be not available.

How comes and how to calculate this?

fixer1234

cybernetic.nomad is correct in that Microsoft says it's supposed to be there. But it looks like Microsoft lied. :-) I just checked Excel Online. You're right, it isn't there.

You can do a simple date subtraction, but there are a few things to be aware of.

  • DATEDIF ensures that you're working with dates rather than date/times. Dates and times are stored together (dates are day counts, stored as the integer portion of the value; times are fraction of a day, stored with the day count as a decimal fraction). A pure date is stored as a date as of crossing midnight (time of 0).

    If your values are date/times, simply subtracting the values will give a result that includes a time difference, which could round to another day and give you the wrong result. Even without rounding, the result can still include a fraction of a day, which can give you inaccurate results in calculations if the calculations are based on whole day counts. In that case, you can use the integer function to chop off times before subtraction (=INT(B1)-INT(A1)).

  • DATEDIF also adds a feature over a simple subtraction: you can specify the units you want, and it can do some convenient conversion functions. Subtraction will give you the difference in days (those are the units that dates are stored in). So if you want other units, you would need to convert the result to the units you want.

And yes, you can use TODAY as one of the dates, but recognize that it's volatile (it gets updated every time anything in the spreadsheet changes). So tomorrow, your spreadsheet will show a different date difference. If you're working with hard-coded dates, the result won't change. Of course, if you are doing something like tracking days remaining or elapsed days, you might want to use TODAY for a dynamic value.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Office 365 Excel Online keeps on deleting a textbox

From Dev

Excel office 365 (online version) - changing decimal separator

From Dev

SPSecurityEventReceiver in office 365 or SharePoint online

From Dev

Install App in Office 365 online

From Dev

Office 365 requires an online repair every reboot

From Dev

Microsof office 365 excel formula

From Dev

SharePoint Online (Office 365) login form in a Office task pane app

From Dev

Excel DateDif() or =NETWORKDAYS()

From Dev

Is there a way to programatically edit Office 365 Excel documents?

From Dev

Install Microsoft Excel 2016 via Office 365

From Dev

Microsoft Excel (Office 365) acting really weird

From Dev

Finding the TargetVersion for an Office 365 Excel build

From Dev

Activate a solution (.wsp) programmatically in Office 365 (Sharepoint online) site collection

From Dev

How to access the UCWA endpoint for Lync Online (Office 365)?

From Dev

CRM Online 2013 Email Router Configuration with Office 365 on Cloud

From Dev

SharePoint CSOM: Open .docx file in Word Online (Office 365)

From Dev

Access denied office 365 / SharePoint online with Global Admin account

From Dev

SharePoint CSOM: Open .docx file in Word Online (Office 365)

From Dev

Show paragraph and formatting marks in "Office365: Word Online"

From Dev

Downloading a local copy of One Note from Office 365 Online

From Dev

What is the location (skydrive) of an opened online office 365 document?

From Dev

Office 365 API Search replace on Word online (fault?)

From Dev

SharePoint Online (Office 365) - SharePoint Designer not allowing to save file

From Dev

Upgrade from Excel 2007 to Office 365: Excel very slow

From Dev

How to determine if an Office Add-in is running under Excel or Excel Online?

From Dev

Excel 2010 Crashes When Opening Files From Sharepoint (office 365)

From Dev

Unable to Preview Excel file Attachment in Microsoft Office 365

From Dev

Office 365 api (or equivalent) for Word/Excel collaborative editing without account?

From Dev

MacOS Mojave – Microsoft Office 365 2019 – Excel – VBAProject References Missing

Related Related

  1. 1

    Office 365 Excel Online keeps on deleting a textbox

  2. 2

    Excel office 365 (online version) - changing decimal separator

  3. 3

    SPSecurityEventReceiver in office 365 or SharePoint online

  4. 4

    Install App in Office 365 online

  5. 5

    Office 365 requires an online repair every reboot

  6. 6

    Microsof office 365 excel formula

  7. 7

    SharePoint Online (Office 365) login form in a Office task pane app

  8. 8

    Excel DateDif() or =NETWORKDAYS()

  9. 9

    Is there a way to programatically edit Office 365 Excel documents?

  10. 10

    Install Microsoft Excel 2016 via Office 365

  11. 11

    Microsoft Excel (Office 365) acting really weird

  12. 12

    Finding the TargetVersion for an Office 365 Excel build

  13. 13

    Activate a solution (.wsp) programmatically in Office 365 (Sharepoint online) site collection

  14. 14

    How to access the UCWA endpoint for Lync Online (Office 365)?

  15. 15

    CRM Online 2013 Email Router Configuration with Office 365 on Cloud

  16. 16

    SharePoint CSOM: Open .docx file in Word Online (Office 365)

  17. 17

    Access denied office 365 / SharePoint online with Global Admin account

  18. 18

    SharePoint CSOM: Open .docx file in Word Online (Office 365)

  19. 19

    Show paragraph and formatting marks in "Office365: Word Online"

  20. 20

    Downloading a local copy of One Note from Office 365 Online

  21. 21

    What is the location (skydrive) of an opened online office 365 document?

  22. 22

    Office 365 API Search replace on Word online (fault?)

  23. 23

    SharePoint Online (Office 365) - SharePoint Designer not allowing to save file

  24. 24

    Upgrade from Excel 2007 to Office 365: Excel very slow

  25. 25

    How to determine if an Office Add-in is running under Excel or Excel Online?

  26. 26

    Excel 2010 Crashes When Opening Files From Sharepoint (office 365)

  27. 27

    Unable to Preview Excel file Attachment in Microsoft Office 365

  28. 28

    Office 365 api (or equivalent) for Word/Excel collaborative editing without account?

  29. 29

    MacOS Mojave – Microsoft Office 365 2019 – Excel – VBAProject References Missing

HotTag

Archive