?
Solved

Crystal Reports XI - Format Date Field Year()

Posted on 2009-04-01
1
Medium Priority
?
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

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. …
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

762 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