MonthNameList ( start ; number ; short )
List of short or full month names
Average rating: 4.8 (32 votes) Log in to vote
David Head - Show more from this author
uLearnIT http://www.ulearnit.com.au/ |
MonthNameList ( 7; 3; 1 )
"Jul¶Aug¶Sep"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Returns a return-delimited list of month names starting from the specified month number
Comments
Alex Bassin, SYNAP Aug 29, 2019 |
||
Here is a modification on this function //MonthYearList ( StartDate; EndDate; display ) /* - returns a return-delimited list of month and years starting based on a date range Parameters - short: 1= Full month name, 2= short month name, 3= number of month / year, 4=as date (first of the month) Credit: Alex Bassin, SYNAP Corporation - www.synap.net Special thanks to David Head who build the original */ Let ( [ //TEST /* StartDate="1/1/2018"; EndDate= "5/1/2023; display=1; */ //----------------------- NumberofMonths = Abs(Round (GetasNumber(GetAsDate (EndDate) - GetAsDate ( StartDate ) )/30 ;0)); StartMonth= Month ( GetAsDate (StartDate) ); StartYear= Year ( GetAsDate (StartDate) ); ~year = If ( StartMonth ≥ 13 ; If ( PatternCount ( StartMonth / 12 ; "," ) > 0 ; StartYear + Int ( StartMonth / 12 ) ; StartYear + ( Int ( StartMonth / 12 ) - 1 ) ) ; StartYear ) ; ~mn = MonthName ( Date ( StartMonth ; "1" ; ~year ) ) & " " & ~year ] ; Case ( display = 2 ; Left ( ~mn ; 3 ) & " " & ~year ; display = 3 ; StartMonth & "/" & ~year ; display = 4 ; Date (StartMonth; 1; & ~year) ; ~mn ) & If ( NumberofMonths > 1 ; ¶ & MonthYearList ( Date (StartMonth + 1 ; 1 ; StartYear); EndDate ; display ) ) ) |
||
Alex Bassin, SYNAP Aug 29, 2019 |
||
See updates at https://www.briandunning.com/cf/2294 | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.