Hi group,
I'm trying to put together a calculation that examines the current day and then appends the appropriate "st", "nd" or "rd" for some legalese stuff we're doing (e.g., "This 30th day of April 2007). Problem is, it doesn't seem to evaluate the entire string and I can't quite figure out why. When I test the calc I get a result like "30st" when it should be "30th". Can anyone see where I'm doing something wrong here:
The field this applies to is c_day_append, and returns a text result. Our people are working in a mixed FileMaker 8.5 and 9 environment.
I'm trying to put together a calculation that examines the current day and then appends the appropriate "st", "nd" or "rd" for some legalese stuff we're doing (e.g., "This 30th day of April 2007). Problem is, it doesn't seem to evaluate the entire string and I can't quite figure out why. When I test the calc I get a result like "30st" when it should be "30th". Can anyone see where I'm doing something wrong here:
Code:
Case (
Day ( Get ( CurrentDate ) = 1); Day ( Get ( CurrentDate )) & "st";
Day ( Get ( CurrentDate ) = 2); Day ( Get ( CurrentDate )) & "nd";
Day ( Get ( CurrentDate ) = 3); Day ( Get ( CurrentDate )) & "st";
Day ( Get ( CurrentDate ) = 4); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 5); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 6); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 7); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 8); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 9); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 10); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 11); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 12); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 13); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 14); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 15); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 16); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 17); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 18); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 19); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 20); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 21); Day ( Get ( CurrentDate )) & "st";
Day ( Get ( CurrentDate ) = 22); Day ( Get ( CurrentDate )) & "nd";
Day ( Get ( CurrentDate ) = 23); Day ( Get ( CurrentDate )) & "rd";
Day ( Get ( CurrentDate ) = 24); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 25); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 26); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 27); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 28); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 29); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 30); Day ( Get ( CurrentDate )) & "th";
Day ( Get ( CurrentDate ) = 31); Day ( Get ( CurrentDate )) & "st"
)
The field this applies to is c_day_append, and returns a text result. Our people are working in a mixed FileMaker 8.5 and 9 environment.