Table of contents
TOC
Collapse the table of content
Expand the table of content

Date functions

Owen Duncan|Last Updated: 4/19/2018

Date

FunctionDescription
Date.AddDaysReturns a Date/DateTime/DateTimeZone value with the day portion incremented by the number of days provided. It also handles incrementing the month and year potions of the value as appropriate.
Date.AddMonthsReturns a DateTime value with the month portion incremented by n months.
Date.AddQuartersReturns a Date/DateTime/DateTimeZone value incremented by the number of quarters provided. Each quarter is defined as a duration of three months. It also handles incrementing the year potion of the value as appropriate.
Date.AddWeeksReturns a Date/DateTime/DateTimeZone value incremented by the number of weeks provided. Each week is defined as a duration of seven days. It also handles incrementing the month and year potions of the value as appropriate.
Date.AddYearsReturns a DateTime value with the year portion incremented by n years.
Date.DayReturns the day for a DateTime value.
Date.DayOfWeekReturns a number between 0 and 6 representing the day of the week from a DateTime value.
Date.DayOfWeekNameReturns the day of the week name.
Date.DayOfYearReturns a number that represents the day of the year from a DateTime value.
Date.DaysInMonthReturns the number of days in the month from a DateTime value.
Date.EndOfDayReturns a DateTime value for the end of the day.
Date.EndOfMonthReturns a DateTime value for the end of the month.
Date.EndOfQuarterReturns a Date/DateTime/DateTimeZone value representing the end of the quarter. The date and time portions are reset to their terminating values for the quarter. The timezone information is persisted.
Date.EndOfWeekReturns a DateTime value for the end of the week.
Date.EndOfYearReturns a DateTime value for the end of the year.
Date.FromReturns a date value from a value.
Date.FromTextReturns a Date value from a set of date formats and culture value.
Date.IsInCurrentDayIndicates whether the given datetime value dateTime occurs during the current day, as determined by the current date and time on the system.
Date.IsInCurrentMonthReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the current month, as determined by the current date and time on the system.
Date.IsInCurrentQuarterReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the current quarter, as determined by the current date and time on the system.
Date.IsInCurrentWeekReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the current week, as determined by the current date and time on the system.
Date.IsInCurrentYearReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the current year, as determined by the current date and time on the system.
Date.IsInNextDayIndicates whether the given datetime value dateTime occurs during the next day, as determined by the current date and time on the system.
Date.IsInNextMonthReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the next month, as determined by the current date and time on the system.
Date.IsInNextNDaysIndicates whether the given datetime value dateTime occurs during the next number of days, as determined by the current date and time on the system.
Date.IsInNextNMonthsIndicates whether the given datetime value dateTime occurs during the next number of months, as determined by the current date and time on the system.
Date.IsInNextNQuartersIndicates whether the given datetime value dateTime occurs during the next number of quarters, as determined by the current date and time on the system.
Date.IsInNextNWeeksIndicates whether the given datetime value dateTime occurs during the next number of weeks, as determined by the current date and time on the system.
Date.IsInNextNYearsIndicates whether the given datetime value dateTime occurs during the next number of years, as determined by the current date and time on the system.
Date.IsInNextQuarterReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the next quarter, as determined by the current date and time on the system.
Date.IsInNextWeekReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the next week, as determined by the current date and time on the system.
Date.IsInNextYearReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the next year, as determined by the current date and time on the system.
Date.IsInPreviousDayIndicates whether the given datetime value dateTime occurs during the previous day, as determined by the current date and time on the system.
Date.IsInPreviousMonthReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the previous month, as determined by the current date and time on the system.
Date.IsInPreviousNDaysIndicates whether the given datetime value dateTime occurs during the previous number of days, as determined by the current date and time on the system.
Date.IsInPreviousNMonthsIndicates whether the given datetime value dateTime occurs during the previous number of months, as determined by the current date and time on the system.
Date.IsInPreviousNQuartersIndicates whether the given datetime value dateTime occurs during the previous number of quarters, as determined by the current date and time on the system.
Date.IsInPreviousNWeeksIndicates whether the given datetime value dateTime occurs during the previous number of weeks, as determined by the current date and time on the system.
Date.IsInPreviousNYearsIndicates whether the given datetime value dateTime occurs during the previous number of years, as determined by the current date and time on the system.
Date.IsInPreviousQuarterReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the previous quarter, as determined by the current date and time on the system.
Date.IsInPreviousWeekReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the previous week, as determined by the current date and time on the system.
Date.IsInPreviousYearReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred during the previous year, as determined by the current date and time on the system.
Date.IsInYearToDateReturns a logical value indicating whether the given Date/DateTime/DateTimeZone occurred in the period starting January 1st of the current year and ending on the current day, as determined by the current date and time on the system.
Date.IsLeapYearReturns a logical value indicating whether the year portion of a DateTime value is a leap year.
Date.MonthReturns the month from a DateTime value.
Date.MonthNameReturns the name of the month component.
Date.QuarterOfYearReturns a number between 1 and 4 for the quarter of the year from a DateTime value.
Date.StartOfDayReturns a DateTime value for the start of the day.
Date.StartOfMonthReturns a DateTime value representing the start of the month.
Date.StartOfQuarterReturns a DateTime value representing the start of the quarter.
Date.StartOfWeekReturns a DateTime value representing the start of the week.
Date.StartOfYearReturns a DateTime value representing the start of the year.
Date.ToRecordReturns a record containing parts of a Date value.
Date.ToTextReturns a text value from a Date value.
Date.WeekOfMonthReturns a number for the count of week in the current month.
Date.WeekOfYearReturns a number for the count of week in the current year.
Date.YearReturns the year from a DateTime value.
Parameter valuesDescription
Day.SundayRepresents Sunday.
Day.MondayRepresents Monday.
Day.TuesdayRepresents Tuesday.
Day.WednesdayRepresents Wednesday.
Day.ThursdayRepresents Thursday.
Day.FridayRepresents Friday.
Day.SaturdayRepresents Saturday.
© 2018 Microsoft