Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Customizing Number for th/st Post Reply Post New Topic
Author Message
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Topic: Customizing Number for th/st
     Posted: 15 Jun 2011 at 9:41am
Is there a function or expression that will make a number go from

1 to 1st
2 to 2nd
3 to 3rd

etc, etc.

Regards,
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Jun 2011 at 10:27am
I do not recall seeing one. I do remember having to write a similar conversion string...something like:
 
totext(value) + (if value=0 then "" else if remainder(value,10) in [0,4,5,6,7,8,9] then "th" else if remainder(value,10) in [1] then "st" else if remainder(value,10) in [2] then "nd" else if remainder(value,10) in [3] then "rd")


Edited by DBlank - 15 Jun 2011 at 10:27am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum