Date and Time

This page presents procedures from class WorksheetFunction related to the theme Date and Time

IsoWeekNum - Returns the ISO week number of the year for a given date.

Days - Returns the number of days between two dates.

Days360 - Returns the number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations.

EDate - Returns the serial number that represents the date that is the indicated number of months before or after a specified date (the start_date). Use EDate to calculate maturity dates or due dates that fall on the same day of the month as the date of issue.

EoMonth - Returns the serial number for the last day of the month that is the indicated number of months before or after start_date. Use EoMonth to calculate maturity dates or due dates that fall on the last day of the month.

NetworkDays - Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays. Use NetworkDays to calculate employee benefits that accrue based on the number of days worked during a specific term.

NetworkDays_Intl - Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days. Weekend days and any days that are specified as holidays are not considered as workdays.

Weekday - Returns the day of the week corresponding to a date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday), by default.

WeekNum - Returns a number that indicates where the week falls numerically within a year.

WorkDay - Returns a number that represents a date that is the indicated number of working days before or after a date (the starting date). Working days exclude weekends and any dates identified as holidays. Use WorkDay to exclude weekends or holidays when you calculate invoice due dates, expected delivery times, or the number of days of work performed.

WorkDay_Intl - Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. Weekend parameters indicate which and how many days are weekend days. Weekend days and any days that are specified as holidays are not considered as workdays.

YearFrac - Calculates the fraction of the year represented by the number of whole days between two dates (the start_date and the end_date). Use the YearFrac worksheet function to identify the proportion of a whole year's benefits or obligations to assign to a specific term.