Brian Dunning's FileMaker Custom Functions

AbbrMonthName ( monthNumber )

Return Abbreviated Month Name from Month Number

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

Mike Beargie   Mike Beargie
MainSpring, Inc.
http://www.gomainspring.com

Share on Facebook Share on Twitter

  Sample input:
AbbrMonthName( 9 )
  Sample output:
Sept

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

Allows you to customize an abbreviated month list for date display calculations. IE you can add periods on the end, return all caps, etc...

 

Comments

Tux   Tux, Montreal
Oct 17, 2013
Here, let me shorten that for you:


Let([
m = monthNumber
];
Case(m = 9 ; "Sept" ; Left(MonthName(Date(m ; 1 ; 2000)) ; 3))
)
 
Mike Beargie   Mike Beargie, MainSpring, Inc.
Oct 17, 2013
Yeah, I know how to take the left three and account for September. That would be an improvement on this one: http://www.briandunning.com/cf/1489

The point of this is NOT to add a "t" to "Sep". It's to use the list for any month name customization you want. IE 1 = Jan, Jan., 1/, 1-, Jy, Jy., First, 1st, 1st., Winter (for a seasonal display calc), etc...

Some developers require customizations for ALL values. An easy case statement like this is a good way to put that together.

But yes, if you just want to add a "t" on "Sep", your calculation is more efficient.
 
Bruce Robertson   Bruce Robertson
Oct 17, 2013
Or:
Choose( monthNumber ; ""; "Jan"; "Feb"; "Mar"; "Apr"; "May"; "Jun"; "Jul"; "Aug"; "Sept"; "Oct"; "Nov"; "Dec" )
 

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.

Under construction. Email me your wish list for improvements.