Solved

Crystal Reports XI - Format Date Field Year()

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

25 Experts available now in Live!

Get 1:1 Help Now