Print Page | Close Window

Upper Case Special Field Date Date (month, Year)

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1984
Printed Date: 06 May 2024 at 1:45pm


Topic: Upper Case Special Field Date Date (month, Year)
Posted By: lsalih
Subject: Upper Case Special Field Date Date (month, Year)
Date 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




Replies:
Posted By: Savan
Date 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


Posted By: Lugh
Date Posted: 07 Jan 2008 at 4:42am
Er, yeah, there's an easier solution.

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






Posted By: lsalih
Date Posted: 07 Jan 2008 at 10:57am
Many thanks to your reply, it is working.
 
THANKS A LOT.
 
Lava


Posted By: lsalih
Date 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



Print Page | Close Window