@nagaraj007
Use the WeekNum and ISOWeekNum functions to determine the week number of a date.
These functions differ in how they determine the first week of the year (week 1):
WeekNum uses the week containing January 1 as the first week of the year. The result from this function can range from 1 to 54.
ISOWeekNum uses the week containing the first Thursday of the year as the first week of the year. This follows the ISO 8601 date and time standard definition for week numbering. The result from this function can range from 1 to 53. It is possible that 52 or 53 may be returned for the first days of January since the dates could belong to the last week of the previous year.
Use the second parameter to WeekNum to specify which day begins a week. You can provide either an Excel code number or use the StartOfWeek enumeration:
ISOWeekNum always uses Monday as the start of the week. In Excel, the WeekNum function supports an addition code 21 that is not supported here; use ISOWeekNum instead.
If you pass a single number to these functions, the return value is a single result. If you pass a single-column table that contains numbers, the return value is a single-column table of results, one result for each record in the argument's table. If you have a multi-column table, you can shape it into a single-column table, as working with tables describes.
Syntax
WeekNum(DateTime [, StartOfWeek ])
- DateTime - Required. Date/Time value to operate on.
- StartOfWeek - Optional. Excel code or StartOfWeek enumeration that determines which day the week begins.
ISOWeekNum(DateTime)
- DateTime - Required. Date/Time value to operate on. The week always begins on Monday.