Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: 1st,2nd,3rd, etc. Post Reply Post New Topic
Author Message
Schugs
Newbie
Newbie


Joined: 08 Aug 2012
Online Status: Offline
Posts: 36
Quote Schugs Replybullet Topic: 1st,2nd,3rd, etc.
    Posted: 06 Dec 2012 at 4:08am
Is there away other than making my own if statement to show a number with the trailing text, IE.

On this 23rd Day of December

Thanks.
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 06 Dec 2012 at 4:12am
There are many options to setup for date, if you right click on a date field you can go to formatting and see your options, and setup your own custom date formats.


tackling the 23rd, 22nd, etc, I am not sure how to do.
IP IP Logged
junkbox
Newbie
Newbie


Joined: 07 Nov 2012
Online Status: Offline
Posts: 17
Quote junkbox Replybullet Posted: 06 Dec 2012 at 2:34pm
@DateToOrdinal

WhileReadingRecords;
NumberVar DayIn := Day (PrintDate); //or your {date.field}
"On this the" 
& 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')
& " day of "
& Totext (PrintDate , "MMMM, yyyy") //again or your {date.field}


Ends up as: On this the 6th day of December, 2012

-jb


Edited by junkbox - 06 Dec 2012 at 2:36pm
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.