Brian Dunning's FileMaker Custom Functions

CF.DotwCwYearToDate ( DOTW ; CW ; Y )

Converts "Day of the week" and "Calendar week" and "Year" to a date.

  Average rating: 4.2 (19 votes) Log in to vote

Thomas Hellwig   Thomas Hellwig
Delasocial GmbH
http://www.delasocial.com

Share on Facebook Share on Twitter

  Sample input:
CF.DotwCwYearToDate ( 1 ; 1 ; 2016 )
CF.DotwCwYearToDate ( 7 ; 8 ; 2016 )
CF.DotwCwYearToDate ( 1 ; 0 ; 2016 )
CF.DotwCwYearToDate ( -1 ; -1 ; 2016 )
  Sample output:
04.01.2016
28.02.2016
28.12.2015
19.12.2015

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

Converts "Day of the week" and "Calendar week" and "Year" to a date (german DIN 1355-1).

This CF works only with the date format used in germany, switzerland, austria and many other countries in europe, middle and south america, middle east, russia, australia, north afrika and some more states (Day.Month.Year). Monday is the first day of the week, sunday is the 7th day of the week.

Please note that the code was written in FileMaker version 12.

 

Comments

comment   comment, VR
Jul 12, 2016
This will fail in a leap year.
 
comment   comment, VR
Jul 12, 2016
See the comments here:
http://www.briandunning.com/cf/229
for a correct calculation that is much simpler and will work with any date format in use.
 

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 20 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: