Solved

Crystal Reports XI - Format Date Field Year()

Posted on 2009-04-01
1
399 Views
Last Modified: 2012-05-06
I am trying to format a date field.  I am trying to get the year.  I have tried:

Year(date)
Int(Year(date))

but the result is always 2,009.00

Any ideas?
0
Comment
Question by:CipherIS
1 Comment
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 24040709
You can format the field using custom formatting

Put the formula on the report
Right Click the field
Click FORMAT FIELD
Select the NUMBER tab
CLick CUSTOMIZE
Choose rounding - 1
Choose decimals - 1
Turn off the thousands separator

Another way is to convert it to a string in the formula

CStr(Year(date),0,'')

or

ToText(Year(date),0,'')

mlmcc

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now