Brian Dunning's FileMaker Custom Functions

getDatesWeek ( theDate, operator, weeks )

Returns the 7 dates (Sunday–Saturday) of the week containing theDate

  Be the first to rate this function Log in to vote

Jonni™   Jonni™ - Show more from this author

  Sample input:
getDatesWeek ( Get ( CurrentDate ) ; "+" ; 2 )
  Sample output:
06/09/2026
07/09/2026
08/09/2026
09/09/2026
10/09/2026
11/09/2026
12/09/2026

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

Returns the 7 dates (Sunday–Saturday) of the week containing theDate,
as a return-delimited list, optionally offset by whole weeks.

Parameters:
theDate : any date
operator: optional - "+" or "-". Omit (along with weeks) for no offset.
weeks: optional - number of weeks to offset by

Examples:
getDatesWeek ( Get ( CurrentDate ) ) // current week, Sun-Sat
getDatesWeek ( Get ( CurrentDate ) ; "+" ; 2 ) // 2 weeks from now
getDatesWeek ( "1/1/2026" ; "-" ; 1 ) // 1 week before Jan 1 2026's week

 

Comments

Log in to post comments.

 

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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 22 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: