• Post Reply Bookmark Topic Watch Topic
  • New Topic

Date Formating  RSS feed

 
Ajay Xavier
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i will be given number(only day no month and year) between 01 and 31 , i want to format the number in such a way that

if it is "1" i have to display it as "1st"
if it is "2" i have to display it as "2nd"
if it is "3" i have to display it as "3rd"
..
..
..
if it is "31" i have to display it as "31st"

is there any date utility which does this function directly.
 
Campbell Ritchie
Marshal
Posts: 56525
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't come across a utility which automatically changes 1 to 1st, I am afraid.
Whenever I wanted to do that, I have had to do it the hard way.

CR
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!