Friday, March 31, 2023

VAC - Advanced Excel Techniques - Date Functions

Date Functions are helpful to work around the date and time.  The following are the few of the date functions available in the Excel. 

The main function to calculate dates in Excel:

  • DATE function


Get current date and time:

  • TODAY - returns today's date
  • NOW - returns the current date and time


Convert dates to / from text:

  • DATEVALUE - converts a date in the text format to date format
  • TEXT - converts a date to a text value


Retrieve dates in Excel:

  • DAY - returns the day of the month
  • MONTH - returns the month of a specified date
  • YEAR - returns the year of a specified date
  • EOMONTH - returns the last day of the month
  • WEEKDAY - returns the day of the week
  • WEEKNUM - returns the week number of a date


Calculate date difference:

  • DATEDIF - returns the difference between two dates
  • EDATE - returns a date N months before or after the start date
  • YEARFRAC - calculates the fraction of the year between 2 dates  (it is used to calculate the age by providing the date of Birth and today date).


Calculate workdays:

  • WORKDAY - returns a date N working days in the future or in the past
  • NETWORKDAYS - returns the number of workdays between two dates