Brian Dunning's FileMaker Custom Functions

dispjahr ( sorted ; index )

Collapses a list of sorted year numbers to a more readable format

  Average rating: 3.7 (20 votes) Log in to vote

Mathias Drexler   Mathias Drexler
acib GmbH
http://www.acib.at

Share on Facebook Share on Twitter

  Sample input:
Dispjahr(
"
2010
2011
2012
2014
2015
"
  Sample output:
2010 - 2012, 2014 - 2015

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

The function collapses a list of sorted year numbers to a more conventional, readable format eliminating years following each other and substituting it with a dash (-). Thereby a long list of years (e.g. generated from single records) ist converted to a readable short expression.

I used it for some accounting purposes, where I have one record per year and wanted to build a list, which years are present.

 

Comments

Thomas Hellwig   Thomas Hellwig, Hamburg / Germany
Jun 11, 2016
Please note:
"Function Definition (the function itself):
Please use FileMaker's convention of one space between all terms and separators."

To edit it please click on the link: This is my Custom Function and I want to edit it
 

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

Under construction. Email me your wish list for improvements.