Brian Dunning's FileMaker Custom Functions

DayWeekYear2Date ( dayNR ; weekNR ; yearNR )

Turns DayNr. WeekNr. & Year into a Date

  Average rating: 3.9 (49 votes) Log in to vote

Arjen van der Ree   Arjen van der Ree

Share on Facebook Share on Twitter

  Sample input:
DayWeekYear2Date ( 2 , 27 , 2012 )
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

In many overviews (calendars e.g.) users want to use week numbers & years to see a set of days (mon - fri). This function makes is easy to translate from week-numbers, years and day-numbers (2=monday ... 6 = friday) to calculate say 5 dates to relate to records/portals in a week view.
I couldn't find anything like this on the internet and it took quite some time and testing to get is to work properly.
[dayNR ; 2 .. 5 (mon - fri) ]
[weekNR ; 1 ... 53*
[yearNR ; any year that Filemaker supports ]

*week-number 53 will goto wk 1 the following year in most cases.



comment   comment, VR
Dec 25, 2011
Couldn't this be simpler? See:
Peter Bouma   Peter Bouma, Amsterdam
Mar 18, 2016
I'm not happy with the declaration of script variables ($...) in this function. They should remain local/private within the Let statement of this CF. One way to mark them as private is to use '~' or '@' (in fact anything different from '$' or '$$') instead of the '$' prefix used here.

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.