>Well, that's a start for now. It's hard to believe noone has been any farther than 31 so far. Thanx though!
I didn't say it's the only way. ;) Here's a link to the thread I referred to earlier.
446283BTW while I'm thinking about this. DateOrdinal is not the best name for this. I think ordinal is 1st, 2nd. The st and nd is only an abbreviation of the ordinal. So it should only be called DateOrdinal if it returns "1st" to "31st".
Ordinal should be "0th" - "Googolplexth". Don't try to say that three times fast. It made me bite my tongue ;)
>
>>I asked this same question quite some time ago. I needed the numbers from 1-31 for days of the month. This was the fastest approach by a long way.
>>
>>*DateOrdinal.PRG
>>*This function correctly determines the extension to
>>*apply to a number (between 1 and 31) to make
>>*the number 1st, 2nd, 3rd ... 31st
>>lParameters m.tiNumber
>>return subs("stndrdthththththththththththththththththstndrdthththththththst", (m.tiNumber*2)-1, 2)
>>
>>There are other ways to handle this for any range of values.
>>
>>>I didn't want to reinvent the wheel so I thought I'd ask first. Does anyone have a utility to convert a number to a word that represents a position? For example.
>>>
>>>1 to "1st" (or "First")
>>>2 to "2nd" (or "Second")
>>>3 to "3rd" (or "Third")
>>>4 to "4th" (or "Fourth")
>>>5 to "5th" (or "Fifth") etc. etc.
>>>
>>>I've seen some other number to word conversions, but they weren't exactly what I was looking for.
>>>
>>>TIA