Reference > Functions reference > Date functions > WeekOfYear
 
WeekOfYear
Purpose 
Returns the number of weeks after January 1 of the year of a date.
Format 
WeekOfYear(date)
Parameters 
date - any calendar date
Data type returned 
number
Originated in 
FileMaker Pro 6.0 or earlier
Description 
Fractions of weeks occurring at the beginning or end of the year count as full weeks, so the WeekOfYear function returns values 1 to 54.
Important  To avoid errors when using dates, always use four-digit years. For more information about how FileMaker Pro handles two-digit dates, see Entering dates with two-digit years.
Examples 
WeekOfYear ( "1/1/2019" ) returns 1.
WeekOfYear ( ProjectDue ) returns 6, when ProjectDue is 2/2/2019.
WeekOfYear ( "1/1/2019" ) - WeekOfYear ( "2/2/2019" ) returns -5.
Related topics 
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas