cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello

I have a report that takes the current year and converts it to text using the ToText function e.g. ToText(Year(CurrentDate))

In Crystal this returns 2013

When I run the same report using the .NET runtimes for Crystal 2011, the same formula return 2,013.00

I know that the ToText function has extra parameters to handle formatting, however, I expect the results to be consistent between Crystal Reports and runtimes. Is there an over-ride for the runtimes (registry setting perhaps) that can be used to make the results formatted like Crystal Reports?

0 Likes
View Entire Topic
ido_millet
Active Contributor
0 Likes

Sure. Use this

ToText(CurrentDate, "MM")

And in a similar way, this is a slightly simpler solution for the original year question:

ToText(CurrentDate, "yyyy")