Reference > Functions reference > Date functions > WeekOfYearFiscal
 

WeekOfYearFiscal

Returns a number from 1 to 53, representing the week containing a date, from a starting day.

Format 

WeekOfYearFiscal(date;startingDay)

Parameters 

date - any calendar date

startingDay - any number between 1 and 7, where 1 represents Sunday

Data type returned 

number

Originated in 

FileMaker Pro 6.0 or earlier

Description 

startingDay indicates which day is considered the first day of the week.

The first week of the year is the first week that contains four or more days of that year. For example, if you select 1 (Sunday) as the starting day, then January 1 must be on Sunday, Monday, Tuesday, or Wednesday for that week to be the first week of the fiscal year. If you select 2 (Monday) as the starting day, then January 1 must be on Monday, Tuesday, Wednesday, or Thursday for that week to be the first week of the fiscal year.

It is possible, using this function, that dates in a particular year will be returned as the 53rd week of the previous year. For example, if in 2008 you selected Sunday (1) as the starting date, then January 1, 2, or 3 in 2009 would occur in week 53 of fiscal year 2008 (in 2009, January 1 is on a Thursday). The first day of fiscal year 2009 would be on Sunday, January 4, because you selected Sunday (1) as the starting day.

Example 1 

WeekOfYearFiscal ( Date ( 1 ; 7 ; 2008 ) ; 1 ) returns 2.

WeekOfYearFiscal ( Date ( 1 ; 1 ; 2009 ) ; 5 ) returns 1.

WeekOfYearFiscal ( Date ( 1 ; 2 ; 2009 ) ; 1 ) returns 53.

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas