Solved

Crystal Reports XI - Format Date Field Year()

Posted on 2009-04-01
1
397 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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