Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Upper Case Special Field Date Date (month, Year) Post Reply Post New Topic
Author Message
lsalih
Groupie
Groupie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 44
Quote lsalih Replybullet Topic: Upper Case Special Field Date Date (month, Year)
    Posted: 04 Jan 2008 at 12:56pm

Greetings -

I have a report that I would like to have current month and year to be displayed in Caps. Under Special field, there is Data Date which returns the month and year value for me, but don't know how to convert it to Caps.

Basically, all I want is to have current month, year displayed as below on my report:

JANUARY, 2008

Thanks,

Lava

IP IP Logged
Savan
Senior Member
Senior Member
Avatar

Joined: 14 Dec 2007
Location: India
Online Status: Offline
Posts: 162
Quote Savan Replybullet Posted: 04 Jan 2008 at 10:02pm

Hi Lava,

u have to create to formulas. one is for month and another for year. the syntax as below
 
dtmonth (syntax for formula is below)
     UCASE(MONTHNAME(MONTH(DATADATE)))&", "
dtyear (syntax for formula is below)
     YEAR(DATADATE)
by placing this formula u will get the current month and year in ur desired format.
 
if u take year also in the same formula, u will get a decimal (2008.00) also. so its better u take two formulas.
 
i hope this is not the correct solution, but this one way i could suggest. lets hope more better solution from other experts.
 
 
 
Thanks
Savan
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 07 Jan 2008 at 4:42am
Er, yeah, there's an easier solution.

UCase( CStr( DataDate, "MMMM, yyyy" ) )




IP IP Logged
lsalih
Groupie
Groupie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 44
Quote lsalih Replybullet Posted: 07 Jan 2008 at 10:57am
Many thanks to your reply, it is working.
 
THANKS A LOT.
 
Lava
IP IP Logged
lsalih
Groupie
Groupie


Joined: 27 Sep 2007
Location: United States
Online Status: Offline
Posts: 44
Quote lsalih Replybullet Posted: 07 Jan 2008 at 11:04am
Savan - Thank you for your reply, I used the other soultion and it worked.
 
Thanks for your time.
 
Lava
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.031 seconds.