Undocumented Microsoft Excel Functions - the MS Excel DateDif Function
Undocumented Microsoft Excel Functions - the MS Excel DateDif Function
Users of Access may know that it supports a useful function called DateDiff, which returns the difference between two dates expressed in units chosen by you, the user of Excel. Want to know how many months it is to Christmas? How many days it is since your birthday? The DateDif function will tell you - but reluctantly.
The syntax of the function is:
=DateDif(First date, Second date, Code)
where:
"First date" is the earlier of the two dates
"Second date" is the later of the two dates
"Code" determines how you want to calculate the difference. It can take 6 possible values: "d", "m", "y", "ym", "yd" and "md". To see what these mean, consider the example where:
- the first date is 4th March 1964
- the second date is 29th November 2010
Then here's what the DATEDIF function would return for each of the 6 possible codes:
- "d" would return 17071 (the number of days between the two dates0
- "m" would return 560 (the number of months between the two dates)
- "y" would return 46 (the number of years between the two dates)
- "ym" would return 8 (the number of months between the two dates if they were both in the same year)
- "yd" would return 270 (the number of days between the two dates, if they were both in the same year)
- "md" would return 25 (the number of days between the two dates, if they were both in the same month and year
Note that the Excel DateDif function doesn't support arguments like "q" (for quarters), unlike its Access equivalent.
Best Way to Easily Stay on Top of Microsoft Driver Updates Remarkable Assistance from Microsoft Certified Technicians Microsoft SharePoint 2010 – Features and Benefits Microsoft 70-662 Demo How To Password Protect & Decrypt Microsoft Office 2010 Documents Microsoft Support – Virtual Helpdesk on Your Fingers Focus:Microsoft Office or iWork MOOS Project Viewer 2.0 - Support for Microsoft® Project 2010 files Microsoftblacklistscom Removal - How To Remove Microsoftblacklistscom Easily From Your PC How to Split PST File in Microsoft Office Outlook 2007? Earning Your Microsoft Mcsa 2003 70-291 Microsoft Certified Partners : A Look At What's Involved Microsoft SharePoint 2010: A Boon for Developers
www.yloan.com
guest:
register
|
login
|
search
IP(216.73.216.114) California / Anaheim
Processed in 0.016321 second(s), 7 queries
,
Gzip enabled
, discuz 5.5 through PHP 8.3.9 ,
debug code: 34 , 1695, 559,