Crystal reports 水晶报表日期格式

Crystal reports 水晶报表日期格式,crystal-reports,Crystal Reports,如何将日期字段中的日期格式化为打印,如1、2、3等?谢谢我找到了解决办法 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)

如何将日期字段中的日期格式化为打印,如1、2、3等?谢谢

我找到了解决办法

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')

我找到了解决这个问题的方法

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')

太好了。。这也适用于11、12和13。。当我第一次看到“4到20”条款时,我就想知道它。太好了。。这也适用于11、12和13。。当我第一次看到“4至20”条款时,我就想知道它。