Hi, how can I format the day from a date field to print like 1st 2nd 3rd and so on? Thanks
+1
A:
I found a solution for this.
NumberVar DayIn := Day (PrintDate);
Totext (DayIn , 0 )
& (if DayIn in 4 to 20 then 'th' else
if remainder (DayIn , 10) = 1 then 'st' else
if remainder (DayIn , 10) = 2 then 'nd' else
if remainder (DayIn , 10) = 3 then 'rd' else 'th')
andySF
2010-02-16 13:26:24
You should mark it as the accepted answer if it works for you
CodeByMoonlight
2010-02-16 16:44:55