Looks good to me. Actually, I was trying to make my approach more generic; with minor changes it would work for any number.
>> Roughly, it would be something like this:
>> Define a variable lnDay in your report, or in the calling program, where
>> lnday = IIF(BETWEEN(DAY(DATE()), 10, 20) .OR. MOD(DAY(DATE()), 10) = 0, 9,
>> MOD(DAY(DATE()), 10))
>> The expression to display the ordinal day number would be :
>> ALLTRIM(STR(DAY(DATE()))) + iif(lnDay < 2, 'st', iif(lnDay < 3, 'nd',
>> iif(lnDay < 4, 'rd', "th")))
>>
>> >Anyone know how to put ordinal numbers in a report. I need to print the
>> day
>> >of the date as
>> >
>> >1st
>> >2nd
>> >3rd
>> >4th..... etc.
>
>How about a call to the following UDF:
>
>proceudre Day_th
>parameter ldDate
>m.lnDay = day(m.lnDate)
>m.lcReturn = "th"
>do case
> case m.lnDay = 1 or m.lnDay = 21 or m.lnDay = 31
> m.lcReturn = "st"
> case m.lnDay = 2 or m.lnDay = 22
> m.lcReturn = "nd"
> case m.lnDay = 3 or m.lnDay = 23
> m.lcReturn = "rd"
>endcase
>return m.lcReturn
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only